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

https://github.com/manoj-m-01/express-boilerplate

Production-ready Express.js + TypeScript boilerplate with ESLint, Prettier, Docker, Docker Compose, Winston logging, Morgan, Helmet, Rate Limiting, and Yarn support.
https://github.com/manoj-m-01/express-boilerplate

boilerplate docker docker-compose eslint expreesjs express-boilerplate prettier prettier-eslint typescript

Last synced: 10 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# 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 v22.19.0 LTS
- Docker

## ๐Ÿš€ Getting Started

### 1. Clone the Repo

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

### 2. Install Dependencies

```bash
yarn install
```

### 3. Run in Development

```bash
yarn dev
```

Or using Docker:

```bash
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

```bash
docker-compose -f docker-compose-dev.yaml up --build
# Or
podman compose -f docker-compose-dev.yaml up
```

### Production

```bash
docker-compose -f docker-compose-prod.yaml up --build
# Or
podman compose -f docker-compose-prod.yaml up
```

---

## ๐Ÿงช Linting & Formatting

```bash
yarn lint
yarn prettier:check
yarn prettier:format
```

---

## ๐Ÿ“ License

MIT License

---

## ๐Ÿ™Œ Acknowledgements

- [Express](https://expressjs.com/)
- [TypeScript](https://www.typescriptlang.org/)
- [Winston](https://github.com/winstonjs/winston)
- [Docker](https://www.docker.com/)