A template for creating NestJS modules.
Licensed under the MIT license and is free for private or commercial projects.
This template provides a solid foundation for building standalone and reusable NestJS modules. Designed specifically for NestJS v11 applications, it ensures seamless integration, scalability, and consistency across multiple projects. By using this template, you can hit the ground running and save valuable time when creating reusable modules, as it includes pre-configured tools and best practices.
Before you begin, ensure you have met the following requirements:
- Node.js: Version 20.x (as specified in .nvmrc) is required.
- npm: Node.js package manager for managing dependencies.
- NestJS CLI: Ensure your app is generated using
@nestjs/cli
for best compatibility.
This template includes the following additional tools and configurations:
- TypeScript for static type checking and improved developer experience.
- Jest for unit testing, along with
@nestjs/testing
for testing utilities. - ESLint for linting TypeScript code to maintain code quality.
- Prettier for enforcing consistent code formatting across the codebase.
- Husky for Git hooks to automate tasks such as linting, formatting, and testing before commits.
- CI (Continuous Integration) setup with GitHub Actions for automated testing, building, type-checking, and publishing the package to npmjs.
If you like what you've seen so far and think this setup fits your needs, you can quickly get started by clicking the Use this template button at the top of the repository on GitHub.
Once you've created your package, follow these steps to get up and running:
-
Clone Your Repository
Clone your repository and navigate into the package directory:
git clone https://github.com/YOUR_USERNAME/YOUR_PACKAGE.git cd YOUR_PACKAGE
-
Install Dependencies
Ensure you have the required tools installed and then run:
npm install
Now you can start building your NestJS modules - happy coding! 🎉
Before contributing to this package, please refer to the contributing documentation.