template-server-nodejs
template-server-nodejs copied to clipboard
Template Server Rest API
This project is a base template for Node.js Rest API applications, using the follow stack:
- TypeScript, ES6,
- Sequelize,
- Postgres,
- Express JS,
- Passport JS with JWT,
- Mocha,
- Chai,
- supertest,
- test-double.
Requirements
- NodeJS 6.10.2+ Support ES6
- NPM 3.10.10+
- Docker lastest
Run postgres with docker
First create the database postgres inside docker with command:
docker-compose up
The Docker Compose will create the database called ts-api
Run application
Inside the project root folder use the command
npm install
npm run compile && npm start
To start the server with ts-node, use the command:
npm run start-dev
Run tests
npm run comiple && npm run integration-test
npm run compile && npm run integration-coverage
Licence
This project is released under the MIT License.