- ECMA Script 6 standard
- Express Framework support
- Swagger API documentation
- Sequelize Framework
- Bluebird A+ class promises
- MySQL support
- multiple environments
- automatically load controllers & models ( no need to specify files when add something new to
app/models
andapp/controllers
) - live-reload
- AirBnb linter
- JS Inspect for duplicated code
- YAML environment config files
.
├── app
│ ├── controllers ( Node Express API routes )
│ └── models ( Sequelize database models )
├── config ( Environments config )
├── fixtures ( Sequelize JSON data fixtures )
├── lib ( custom libraries )
└── public ( Express static files )
You will need these tools to set up a local development environment:
In order to change Node's server environment (which by default is local
) run this :
export NODE_ENV="dev"
NOTE : check config/
YML environment files
username : "test"
password : "4f1070d6e58"
database : "test"
hostname : "localhost"
Live auto reload on files changes , enabled by default on local
environment !!!
$ npm install
$ npm start
API url http://localhost:5000/
API Docs url http://localhost:5000/docs
Tests
$ npm test
Eslint
$ npm run eslint
JS inspect ( duplicated code check )
$ npm run jsinspect
Database it's maintained with the power of the Sequelize Framework
Tables & schema are created by default when you initiate the NodeJS server . On dev
& local
environments
every time when you restart the Node server your data it's wiped out and tables recreated , this it's done
with the help of wipe: true
line stored on config/
environment files. For prod
, data it's created only once,
and the best to modify tables it's to use Sequelize Migrations
Swagger API Documentation http://swagger.io/
NOTE : API docs are available only on the development environments .
You can access the API documentation locally on http://localhost:5000/docs
Swagger Specifications are added on a specific way on this project:
- paths specifications are defined directly into the Node Express controllers
app/controllers
as YAML comments using https://www.npmjs.com/package/swagger-jsdoc