https://github.com/talatkuyuk/nodejs-express-jwt-mongodb-boilerplate
https://github.com/talatkuyuk/nodejs-express-jwt-mongodb-boilerplate
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/talatkuyuk/nodejs-express-jwt-mongodb-boilerplate
- Owner: talatkuyuk
- License: mit
- Created: 2022-01-18T10:38:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-25T18:56:13.000Z (5 months ago)
- Last Synced: 2025-01-25T19:29:49.676Z (5 months ago)
- Language: JavaScript
- Size: 994 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-express-mongo-boilerplate
## The Aim
This project is aimed to provide a boilerplate for a typical backend REST API application.
I created **model-controller-service** structure.
I use **joi** to validate Environment Variables.
I use **express-validator** to validate requests.
I use **winston** as a logger.
I use **morgan** handler to log api requests.## to run
> npm install
Create `.env` file considering the `.env.example`.
Set MongoDB, Redis and SMTP server URLs in the `.env` file.
Chose the server http or https; and provide SSL files in the `/ssl` directory, if necessary.Choose one of below commands
> nodemon src/server.js
> npm run dev## to deploy
I added two remotes `origin` and `heroku`
$ git add remote
$ git add remote$ git push origin main
$ git push heroku main