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! Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community.
Please read through this document before submitting any issues or pull requests to ensure we have all the necessary information to effectively respond to your bug report or contribution.
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
When filing an issue, please check existing open, or recently closed, issues to make sure somebody else hasn't already reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
- A reproducible test case or series of steps
- The version of our code being used
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment
Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that:
- You are working against the latest source on the master branch.
- You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
- You open an issue to discuss any significant work - we would hate for your time to be wasted.
To send us a pull request, please:
- Fork the repository.
- Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change.
- Ensure local tests pass.
- Commit to your fork using clear commit messages.
- Send us a pull request, answering any default questions in the pull request interface.
- Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
GitHub provides additional document on forking a repository and creating a pull request.
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels (enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any 'help wanted' issues is a great place to start.
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.