Nestjs Template

screenshot of Nestjs Template

A simple nestjs starter template.

Overview

This is a nest framework starter template. It is built using Node.js version 18.17.1 and nest version 10.3. It provides a project structure with specific directories for handling basic server requirements, configurations, and separate modules for different business logic. It also includes features like Swagger API documentation, middleware, logging system, CORS support, and connection to a MySQL database. Deployment to a server using PM2 is also supported.

Features

  • Project Structure: The template provides a well-structured project layout, with separate directories for base content, configurations, and business modules.
  • Swagger API Documentation: It includes Swagger integration, allowing for easy generation of API documentation.
  • Middleware: Middleware is provided, allowing for the customization of request and response handling.
  • Logging System: A logging system is implemented to track and log events within the application.
  • CORS Support: Cross-Origin Resource Sharing (CORS) is supported, allowing for easy integration with different domains.
  • MySQL Database Connection: It includes a configuration file to set up a connection to a MySQL database.
  • Environment Variable Configuration: Configuration of environment variables is handled using @nestjs/config and stored in a .env file.
  • Filter, Interceptor, Pipe: Custom filters, interceptors, and pipes can be implemented for request and response handling and validation.

Summary

This nest framework starter template provides a solid foundation for building Node.js applications. It offers a well-organized project structure, includes essential features like Swagger API documentation, middleware, logging system, and CORS support. The template also simplifies the configuration of environment variables and provides options for custom filters, interceptors, and pipes. With easy deployment using PM2, this template streamlines the development and deployment process.