Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lhenriquegomescamilo/template-server-nodejs
https://github.com/lhenriquegomescamilo/template-server-nodejs
chai docker mocha nodejs passaport-jwt postgres sequelize supertest test-doubles typescript
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/lhenriquegomescamilo/template-server-nodejs
- Owner: lhenriquegomescamilo
- Created: 2017-06-02T03:39:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2020-09-04T02:49:45.000Z (over 4 years ago)
- Last Synced: 2024-10-31T08:52:21.347Z (about 2 months ago)
- Topics: chai, docker, mocha, nodejs, passaport-jwt, postgres, sequelize, supertest, test-doubles, typescript
- Language: TypeScript
- Size: 68.4 KB
- Stars: 20
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://opensource.org/licenses/MIT)
[![Travis](https://img.shields.io/travis/lhenriquegomescamilo/template-server-nodejs.svg)](https://img.shields.io/travis/lhenriquegomescamilo/template-server-nodejs.svg)# Template Server Rest API
This project is a base template for Node.js Rest API applications, using the follow stack:
* [TypeScript](https://github.com/Microsoft/TypeScript), [ES6](http://es6-features.org/),
* [Sequelize](http://docs.sequelizejs.com/),
* [Postgres](https://www.postgresql.org/),
* [Express JS](http://expressjs.com/),
* [Passport JS](http://passportjs.org/) with [JWT](https://jwt.io/),
* [Mocha](https://github.com/mochajs/mocha),
* [Chai](http://chaijs.com/),
* [supertest](https://github.com/visionmedia/supertest),
* [test-double](https://github.com/testdouble/testdouble.js).## 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:```sh
docker-compose up
```
The [Docker Compose](https://docs.docker.com/compose/) will create the database called ts-api## Run application
Inside the project root folder use the command
```sh
npm install
npm run compile && npm start
```To start the server with ts-node, use the command:
```sh
npm run start-dev
```## Run tests
```sh
npm run comiple && npm run integration-test
npm run compile && npm run integration-coverage```
## Licence
This project is released under the [MIT License](https://opensource.org/licenses/MIT).