This is my boilerplate for RESTful API with NodeJS and MongoDB
This is my boilerplate for RESTful API with NodeJS and MongoDB.
Modify the config/.env file to your environment variables, set your JWT_SECRET and SMTP variables
NODE_ENV=development
PORT=3001
MONGO_URI=YOUR_URL
JWT_SECRET=YOUR_SECRET
JWT_EXPIRE=30d
JWT_COOKIE_EXPIRE=30
#In Minutes
RESET_PASSWORD_EXPIRATION_TIME=10
EMAIL_VERIFICATION_EXPIRATION_TIME=10
SMTP_HOST=smtp.mailtrap.io
SMTP_PORT=2525
SMTP_EMAIL=
SMTP_PASSWORD=
[email protected]
FROM_NAME=Boilerplate
Install all npm dependecies
npm install
Install nodemon globally
npm install -g nodemon
Run database seeder
node seeder -i
Delete all data
node seeder -d
node run dev
This project is licensed under the MIT License