A template to get started with creating REST APIs using NodeJs, ExpressJS, MongoDB with JWT for authentication.
.
βββ src
βββ controllers
βββ db
βββ errors
βββ middlewares
βββ models
βββ routes
βββ services
βββ utils
βββ app.js
βββ package.json
Git clone the repository and run npm install
git clone https://github.com/ankushk1729/node-express-mongo-template
cd node-express-mongo-template
npm installTo run this project, you will need to add the following environment variables to your .env file
JWT_SECRET
MONGO_URI
ACCESS_TOKEN_EXPIRY
REFRESH_TOKEN_EXPIRY
Start the server in development mode
npm run devStart the server in production mode
npm start