Node Boilerplate 1.0.0
This is a boilerplate for Node JS web application supported with express js framework and mongoose.
Install
For installing this project in your local you need to follow below steps -
- git clone https://github.com/kaustav1808/node_boilerplate.git
- cd node_boilerplate
- npm install
Running the project
- create
.env
file in the project root directory. - add
DB_CONNECTION_STRING = mongodb+srv://<username>:<password>@<hostname>/<dbname>?retryWrites=true&w=majority
in .env file, whereusername
would be your mongodb username,password
would be the password anddbname
would be the database you want to create. - run the command
npm start
.
This boilerplate application is designed based on Test Driven Development (TDD)
Testing the application
For testing the application you need to run the following command -
- npm test