Nest Rest Mongo Boilerplate

screenshot of Nest Rest Mongo Boilerplate
express
nestjs

backend with nest (typescript), mongoose, and authentication

Overview

This boilerplate is designed for quickly prototyping backend applications. It includes features such as database integration, logging, security, and authentication. It provides options for both Docker and non-Docker deployments.

Features

  • Database integration
  • Logging functionality
  • Security features
  • Authentication capabilities

Non-Docker

  1. Ensure MongoDB Community is installed locally or have a subscription to Mongo on the cloud by configuring a cluster in Atlas.
  2. Create a .env file using the command cp .env.example .env and replace the existing environment variables with personal settings (e.g., MongoDB URL).
  3. Modify the connection string in the .env file.
  4. Download dependencies using npm i or yarn.
  5. Start the app in pre-production mode using npm run start or npm run start:dev.

Docker

  1. Set up Docker Desktop on the preferred operating system.
  2. Follow the Docker procedure outlined below.
express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web 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.

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.