Skip to content

Latest commit

 

History

History
31 lines (21 loc) · 601 Bytes

File metadata and controls

31 lines (21 loc) · 601 Bytes

NestJS Template with MongoDB, Swagger and JWT Auth

Description

This template contains a basic setup for a NestJS project with MongoDB, Swagger and JWT Auth. I have also added a basic user module with CRUD operations for reference.

Install dependencies

$ npm install

Set environment variables

> Create a env file
> Paste: MONGO_URI= YOUR_MONGO_URI
> Paste: JWT_SECRET=YOUR_SECRET
> Paste: SWAGGER_USERNAME=YOUR_USERNAME
> Paste: SWAGGER_PASSWORD=YOUR_PASSWORD

Start the server

$ npm run start

Swagger

visit http://localhost:3000/api