index takes in two parameters in the form of env variables. PORT and DB.
$ node PORT=port DB=dbUrl index.js-
To push to dev environment, push to
devbranch. -
To push to staging environment, push to the
stagingbranch.
Just clone the repository:
$ git clone https://github.com/irc-moo/rest-api-service.gitInstall deps:
$ npm installRun:
$ npm run local-devThe structure of the project and explanation follows:
root
├── index.js # Application entry point
├── controllers
│ ├── index.js # file that requires all controllers into a hash
│ └── users.js # an example controller
├── package.json
├── plugins
│ └── index.js # register plugins. add your custom plugins in this folder as well.
├── README.md # YOU ARE HERE
└── routes.js # define all the routes in this file.