Rest Node Nestjs

screenshot of Rest Node Nestjs
nestjs

With this skeleton, we can easily start a server application using Node.js, Nest JS and TypeScript.

Overview

The Nest JS Skeleton is a boilerplate/starter project designed for quickly building RESTful APIs using Node.js, NestsJS, Express, and MySQL. With just one command, users can install and configure a production-ready Node.js app on their machine. The skeleton comes with built-in features such as authentication using JWT, request validation, unit and integration tests, continuous integration, docker support, API documentation, and pagination.

Features

  • Integrated ESLint, Prettier and Husky: Provides integrated linting and formatting tools to ensure code quality.
  • Simple and Standard scaffolding: Sets up a basic project structure for easy development.
  • Production-Ready Skeleton: Comes pre-configured with all necessary features for a production-ready application.
  • Followed SOLID Principles: Adheres to SOLID principles for better code architecture and maintainability.
  • Authentication and authorization: Includes authentication and authorization features using passport.
  • Validation: Provides request data validation using Nest JS Pipe.
  • Logging: Uses winston for centralized logging.
  • Testing: Includes unit and integration tests using Jest.
  • Error handling: Utilizes a centralized error handling mechanism.
  • API documentation: Provides API documentation using swagger.
  • Process management: Uses PM2 for advanced production process management.
  • Dependency management: Uses npm for managing project dependencies.
  • Environment variables: Supports environment variables using dotenv and cross-env.
  • API Versioning: Supports versioning of APIs.
  • Security: Implements security HTTP headers using helmet.
  • Sanitizing: Sanitizes request data against XSS and query injection.
  • CORS: Enables Cross-Origin Resource Sharing using cors.
  • Compression: Implements gzip compression with compression.
  • CI: Provides continuous integration with Travis CI.
  • Docker support: Includes Docker support for easy containerization.
  • Git hooks: Supports Git hooks using husky and lint-staged.
  • Linting: Integrates ESLint and Prettier for code linting.
  • Editor config: Ensures consistent editor configuration using EditorConfig.

Summary

The Nest JS Skeleton is a boilerplate/starter project that provides developers with a solid foundation for building RESTful APIs using Node.js, NestsJS, Express, and MySQL. With its extensive list of built-in features and easy installation process, developers can quickly get started with their projects without having to worry about setting up the basic infrastructure. The skeleton follows best practices such as SOLID principles and includes features like authentication, validation, testing, error handling, API documentation, and more. Overall, it offers a convenient and efficient solution for building high-quality REST applications.

nestjs
Nest

A progressive Node.js framework for building efficient, scalable, and enterprise-grade server-side applications with TypeScript/JavaScript.

docker
Docker

A website that uses Docker for containerization to streamline development, testing, and deployment workflows. This includes features such as containerization of dependencies, automated builds and deployments, and container orchestration to ensure scalability and availability.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

Pug

Pug is a high-performance template engine for Node.js and browsers that enables developers to write HTML templates using a concise and intuitive syntax. It supports a range of features, including template inheritance, conditionals, loops, mixins, and more, and can be easily integrated into a variety of web frameworks and build tools.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.