Skip to content

Production-ready Express.js + TypeScript boilerplate with ESLint, Prettier, Docker, Docker Compose, Winston logging, Morgan, Helmet, Rate Limiting, and Yarn support.

Notifications You must be signed in to change notification settings

MANOJ-M-01/express-boilerplate

Repository files navigation

Express TypeScript Docker Boilerplate

A production-ready Express.js boilerplate using TypeScript, ESLint, Prettier, Docker, Docker Compose, Winston logging, Morgan HTTP logging, Helmet for security, express-rate-limit, and Yarn as the package manager.

🛠 Features

  • ⚙️ Express 5 with TypeScript
  • 🧼 ESLint + Prettier for code linting and formatting
  • 🐳 Docker & Docker Compose for dev and production
  • 🌐 Helmet for security headers
  • 🚫 Rate limiting with express-rate-limit
  • 📜 HTTP request logging with Morgan
  • 🪵 Advanced logging using Winston and Daily Rotate File
  • 🔐 .env support with dotenv
  • 📦 Yarn as the default package manager
  • 📁 Clean and modular file structure

Requirements

  • Node v23.11.0
  • Docker

🚀 Getting Started

1. Clone the Repo

git clone https://github.com/MANOJ-M-01/Express-Boilerplate.git
cd Express-Boilerplate

2. Install Dependencies

yarn install

3. Run in Development

yarn dev

Or using Docker:

docker-compose -f docker-compose-dev.yaml up --build

🛠 Available Scripts

Command Description
yarn dev Start development server with ts-node-dev
yarn start Start server with ts-node
yarn build Compile TypeScript to JavaScript
yarn serve Run compiled code from dist/
yarn typecheck Type check without emitting output
yarn lint Run ESLint
yarn prettier:check Check formatting with Prettier
yarn prettier:format Auto-format code with Prettier

🐳 Docker Usage

Development

docker-compose -f docker-compose-dev.yaml up --build

Production

docker-compose -f docker-compose-prod.yaml up --build

🧪 Linting & Formatting

yarn lint
yarn prettier:check
yarn prettier:format

📝 License

MIT License


🙌 Acknowledgements

About

Production-ready Express.js + TypeScript boilerplate with ESLint, Prettier, Docker, Docker Compose, Winston logging, Morgan, Helmet, Rate Limiting, and Yarn support.

Topics

Resources

Stars

Watchers

Forks