- Login with JWT Authentication
- Signup with email notification
- Guard API with JWT Auth Guard
- Upload Image / File to Cloudinary
- Use Redis Bull for Queue Job
- Sequelize Migration
- Use Pino for Logging
- Clone This Repo
git clone https://github.com/danudenny/nodejs-boilerplate
- Install Package
# NPM
npm install
# Yarn
yarn install
- Copy
.env.example
to.env
- Populate
.env
- App dan Database
PORT = 3000
DEV_DATABASE_URL = postgres://<db_user>:<db_password>@127.0.0.`:5432/<db_name>
DATABASE_URL = postgres://<db_user>:<db_password>@127.0.0.1:5432/<db_name>
NODE_ENV = development
ADMIN_EMAIL = email@email.com
MAIL_USERNAME = username
MAIL_PASSWORD = password
MAIL_HOST = smtp.mailtrap.io
MAIL_PORT = 2525
- JWT
JWT_SECRET = <jsonwebtokensecret>
- Cloudinary
CLOUD_NAME= <cloudynaryname>
API_KEY= <cloudynaryAPIKey>
API_SECRET= <cloudynaryAPISecret>
- Set Environment Development
database/config/config.js
- Start The API
yarn start
oryarn start:dev