This repository provides a boilerplate for starting a project with the NestJS framework and MongoDB. It includes the basic setup and configuration needed to quickly start developing a server-side application.
- NestJS Framework: A progressive Node.js framework for building efficient and scalable server-side applications.
- MongoDB: A source-available cross-platform document-oriented database program.
- Docker: Use Docker to containerize your application and its environment.
- Docker Compose: Easily manage your application services.
Before you start, ensure you have Docker and Docker Compose installed on your machine.
# Clone the repository
$ git clone https://github.com/niksbanna/nestjs-mongodb-boilerplate.git
# Go to the project directory
$ cd nestjs-mongodb-boilerplate
# Start the project
$ docker-compose up
Once the application is up and running, you can access the Swagger API documentation at http://localhost:9001/api/docs
.
Contributions are welcome! Please see our Contributing Guide for more details on how to get started.
Before contributing, please read our Code of Conduct.
This project is licensed under the MIT License - see the LICENSE file for details.
- Author - Narendra Singh
- Website - Portfolio
- Twitter - @your-twitter-handle
This project is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please read more here.
- Visit the NestJS Documentation to learn more about the framework.
- For questions and support, please visit our Discord channel.
- To dive deeper and get more hands-on experience, check out our official video courses.
- Deploy your application to AWS with the help of NestJS Mau in just a few clicks.
- Visualize your application graph and interact with the NestJS application in real-time using NestJS Devtools.
- Need help with your project (part-time to full-time)? Check out our official enterprise support.
- To stay in the loop and get updates, follow us on X and LinkedIn.
When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the deployment documentation for more information.
# development
$ yarn run start
# watch mode
$ yarn run start:dev
# production mode
$ yarn run start:prod
$ yarn install
# unit tests
$ yarn run test
# e2e tests
$ yarn run test:e2e
# test coverage
$ yarn run test:cov
The project follows the standard NestJS directory structure:
src/
: Contains the source code of the application.test/
: Contains the tests for the application.docker-compose.yml
: Docker Compose file to start the application and MongoDB service.package.json
: Contains the dependencies and scripts for the application.
This boilerplate provides a solid foundation for building a NestJS application with MongoDB. It includes all the necessary configurations and scripts to get started quickly. Whether you are a beginner or an experienced developer, this boilerplate can help you save time and focus on building your application.