Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mohansahu18/nodejs-production-template

🌟 Node.js Production Setup Template This repository serves as a template for creating robust and production-ready Node.js applications. It incorporates best practices, essential tools, and modern development workflows to streamline your project setup!
https://github.com/mohansahu18/nodejs-production-template

commitlint cors cros-env eslint expressjs helmetjs husky javascript mongodb mongoose nodejs nodemon prettier production rate-limiter typescript winston-logger

Last synced: about 1 month ago
JSON representation

🌟 Node.js Production Setup Template This repository serves as a template for creating robust and production-ready Node.js applications. It incorporates best practices, essential tools, and modern development workflows to streamline your project setup!

Awesome Lists containing this project

README

        

# 🌟 Node.js Production Setup Template

This repository serves as a **template** for creating robust and production-ready Node.js applications. It includes essential tools, best practices, and modern development workflows to help you kickstart your projects.

## 🚀 Features

- 🗂️ **MVC Architecture**: Organized folder structure for maintainability and scalability.
- 🛠️ **Tool Integration**: Pre-configured with Git, Husky, Prettier, and Commitlint for consistent and high-quality code.
- 🌐 **Environment Management**: Efficient handling of development and production environments.
- 🔒 **Security Best Practices**: Built-in measures to safeguard your app against vulnerabilities.
- 📈 **Error Logging & Monitoring**: Tools for tracking issues and maintaining application health.
- 🐳 **Docker Integration**: Containerization support for modern deployment workflows.

## 📂 Folder Structure

```plaintext
📁 project-root
├── 📁 .husky # Git hooks for enforcing code quality
├── 📁 dist # Compiled output files
├── 📁 docker # Docker-related configurations
├── 📁 logs # Application log files
├── 📁 migrations # Database migration scripts
├── 📁 node_modules # Installed dependencies
├── 📁 public # Static files
├── 📁 script # Utility scripts
├── 📁 src
│ ├── 📁 config # Configuration and environment variables
│ ├── 📁 constant # Constants used throughout the application
│ ├── 📁 controller # API request controllers
│ ├── 📁 middleware # Middleware for handling requests and errors
│ ├── 📁 model # Database models
│ ├── 📁 router # Route definitions
│ ├── 📁 services # Business logic and reusable services
│ ├── 📁 types # Type definitions for TypeScript
│ └── 📁 util # Utility functions for logging, error handling, etc.
│ ├── 📝 app.ts # Main application setup
│ └── 📝 server.ts # Entry point for starting the server
├── 📝 .dockerignore # Files to exclude from Docker builds
├── 📝 .env.development # Environment variables for development
├── 📝 .env.example # Example environment variables
├── 📝 .env.production # Environment variables for production
├── 📝 .gitignore # Ignored files for Git
├── 📝 commitlint.config.js # Commit linting rules
├── 📝 ecosystem.config.js # PM2 configuration for process management
├── 📝 eslint.config.mjs # ESLint configuration file
├── 📝 nodemon.json # Nodemon configuration for development
├── 📝 package-lock.json # Lock file for dependencies
├── 📝 package.json # Project metadata and dependencies
├── 📝 README.md # Documentation
└── 📝 tsconfig.json # TypeScript configuration
```