NOTE: It is not a completed project yet. I continue to improve.
A progressive Node.js framework for building efficient and scalable server-side applications.
Nest framework TypeScript starter repository. This is a simple project to learn NestJS. It uses MongoDB as database and JWT for authentication. It also uses Swagger for API documentation.
- NodeJS
- MongoDB
- Docker (optional)
- You must have installed MongoDB before running the app. If you haven't installed it yet, you can check the installation here on https://docs.mongodb.com/manual/installation/.
-
"JWT_SECRET_KEY"=your_secret_key,
-
"JWT_EXPIRES_IN"=30d,
-
"MONGO_CONNECTION_STRING"=mongodb://localhost:27017/your_database
$ npm install
# development
$ npm run start
# watch mode
$ npm run start:dev
# launch tests
$ npm run test
If u want to run the app with docker, you must have installed docker before. If you haven't installed it yet, you can check the installation here on https://www.docker.com/products/docker-desktop/.
# build docker image
$ docker build -t my-node-app .
# run docker image
$ docker run -p 3000:3000 my-node-app
You can access the Swagger API documentation at http://localhost:3000/api/document after running the application. You can see the API and request validations, you can test endpoints.
Nest is MIT licensed.