Install the below softwares
S.No | Software | Version | Reference |
---|---|---|---|
1 | node | >= 9.10.0 | Node.js installation with nvm |
2 | npm | >= 6.4.1 | npm installation |
3 | postgresql | >= 10.1 | PostgreSQL installation |
-
Clone the project
git clone git@github.com:Codebrahma/nodejs-backend-boilerplate.git
-
Switch your current working directory to the root directory of the project
cd nodejs-backend-boilerplate
-
Install the dependencies required by the app and development environment
npm install
-
Clone the
config/config.json.example
file. Renamed the cloned file toconfig/config.json
cp config/config.json.example config/config.json
-
Open
config/config.json
in your source code editor and update your database credentials for development & test environments. -
Copy the environmental variables for development and test environments
cp config/sample.env.example config/development.env cp config/sample.env.example config/test.env
-
Create databases for development and test environments
NODE_ENV=development node_modules/.bin/sequelize db:create NODE_ENV=test node_modules/.bin/sequelize db:create
-
Run schema migrations for development and test environments
NODE_ENV=development node_modules/.bin/sequelize db:migrate NODE_ENV=test node_modules/.bin/sequelize db:migrate
-
Verify the setup by running the following command. If all the tests pass, then you are good to go. If any tests fail, address your issue by mailing repo maintainers.
npm run test
-
Start the server
npm start
- Create a new feature branch from
master
branch - Make your contribution or changes
- Make sure no test is failing and you have code coverage more than 90% by running
npm run test
- Push your branch to github.com
- Raise PR to
staging
from your feature branch. - Make sure
CircleCI
build passes at your feature branch. Your branch will only be merged after the review done by app maintainers. - Assign
ready-for-review
label to your PR once you are done.