Skip to content

A template to get started with creating REST APIs using NodeJs, ExpressJS, MongoDB with JWT for authentication.

Notifications You must be signed in to change notification settings

ankushk1729/node-express-mongo-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node + Express + MongoDB + JWT

A template to get started with creating REST APIs using NodeJs, ExpressJS, MongoDB with JWT for authentication.

Folder Structure

.
└── src
    ├── controllers
    ├── db
    ├── errors
    ├── middlewares
    ├── models
    ├── routes
    ├── services
    ├── utils
    └── app.js
├── package.json

Installation ⚙️

Git clone the repository and run npm install

  git clone https://github.com/ankushk1729/node-express-mongo-template
  cd node-express-mongo-template
  npm install

Environment Variables

To 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

Run Locally 🚀

Start the server in development mode

  npm run dev

Start the server in production mode

  npm start

About

A template to get started with creating REST APIs using NodeJs, ExpressJS, MongoDB with JWT for authentication.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published