Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tomimelo/node-ts-mad-server
Basic Node Express server structure in Typescript. Includes loggers, exception handlers and database connectors.
https://github.com/tomimelo/node-ts-mad-server
database expressjs http logger nodejs nosql server sql typescript
Last synced: about 11 hours ago
JSON representation
Basic Node Express server structure in Typescript. Includes loggers, exception handlers and database connectors.
- Host: GitHub
- URL: https://github.com/tomimelo/node-ts-mad-server
- Owner: tomimelo
- Created: 2021-08-18T12:09:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-25T20:32:05.000Z (over 2 years ago)
- Last Synced: 2024-12-24T22:03:08.239Z (about 1 month ago)
- Topics: database, expressjs, http, logger, nodejs, nosql, server, sql, typescript
- Language: TypeScript
- Homepage:
- Size: 173 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
Mad Server template
This is a basic http server in typescript for a node project based in express. It has error and exception handlers, loggers, services, repositories and database connector incorporated. Supports class based controllers
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
## About The Project
![product-screenshot]
### Built With
* [Node.js](https://nodejs.org/)
* [Typescript](https://www.typescriptlang.org/)
* [Mad-Server](https://github.com/tomimelo/mad-server)
* [Mad-Logger](https://github.com/tomimelo/mad-logger)## Getting Started
To get a local copy up and running follow these simple steps.
### Prerequisites
You will need a copy of [Node.js](https://nodejs.org/es/) as an environment to run the project. Then you need to use a dependency manager like npm to download dependencies into your project.
* npm
```sh
npm install npm@latest -g
```* Typescript
```sh
npm install -g typescript
```### Installation
1. Clone the repo
```sh
git clone https://github.com/tomimelo/node-ts-mad-server.git
```
2. Install NPM packages
```sh
npm install
```### Compilation
Run `tsc` to compile the project. The compiled files will be stored in the `build/` directory.
### Development server
To watch for file changes and restart server automatically is recommended to install [nodemon](https://github.com/remy/nodemon) and [ts-node](https://github.com/TypeStrong/ts-node). You can install both globally by running `npm install -g nodemon ts-node` or locally as a dev dependency with `npm install nodemon ts-node -D`.
Open a terminal on root directory and run `nodemon` to rerun server automatically on file changes.## Usage
Run `npm start` to compile and run the server. Server will be running by default in `http://localhost:3000/`.
Folder structure
Helpers functions
Valid error codes
Error handler## Contact
Tomás Melone - [email protected]
Project Link: [https://github.com/tomimelo/node-ts-mad-server](https://github.com/tomimelo/node-ts-mad-server)
## Acknowledgements
* [Node.js](https://nodejs.org/)
* [Typescript](https://www.typescriptlang.org/)
* [Express](https://expressjs.com/)
* [Mad-Server](https://github.com/tomimelo/mad-server)
* [Mad-Logger](https://github.com/tomimelo/mad-logger)
* [Config](https://github.com/lorenwest/node-config)
* [Nodemon](https://github.com/remy/nodemon/)
* [ts-node](https://github.com/TypeStrong/ts-node)
* [README](https://github.com/othneildrew/Best-README-Template) template by @othneildrew[forks-shield]: https://img.shields.io/github/forks/tomimelo/node-ts-mad-server.svg?style=for-the-badge
[forks-url]: https://github.com/tomimelo/node-ts-mad-server/network/members
[stars-shield]: https://img.shields.io/github/stars/tomimelo/node-ts-mad-server.svg?style=for-the-badge
[stars-url]: https://github.com/tomimelo/node-ts-mad-server/stargazers
[issues-shield]: https://img.shields.io/github/issues/tomimelo/node-ts-mad-server.svg?style=for-the-badge
[issues-url]: https://github.com/tomimelo/node-ts-mad-server/issues
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/tomasmelone
[product-screenshot]: images/screenshot.png