# Express API

Production-ready Express (TypeScript) starter for building REST APIs, generated by [StackKit](https://github.com/tariqul420/stackkit).

## Requirements

- Node.js >=20 (LTS recommended)
- pnpm or npm

## Quick Start

Install dependencies and start the development server:

```bash
# using pnpm (recommended)
pnpm install
pnpm dev

# or using npm
npm install
npm run dev
```

## Scripts

| Command      | Description              |
| ------------ | ------------------------ |
| `pnpm dev`   | Start development server |
| `pnpm build` | Compile TypeScript       |
| `pnpm start` | Start production server  |

## Environment

Copy `.env.example` to `.env` and fill in your credentials. Do not commit secrets.

## Recommended Folder & File Structure

```text
express-api/
├── src/
│   ├── app.ts
│   ├── server.ts
│   ├── config/
│   │   ├── cors.ts
│   │   ├── env.ts
│   │   ├── logger.ts
│   │   └── rate-limit.ts
│   ├── modules/
│   │   └── health/
│   │       ├── health.controller.ts
│   │       └── health.route.ts
│   ├── routes/
│   │   └── index.ts
│   └── shared/
│       ├── errors/
│       │   └── app-error.ts
│       ├── middlewares/
│       │   ├── error.middleware.ts
│       │   └── not-found.middleware.ts
│       └── utils/
│           ├── catch-async.ts
│           ├── pagination.ts
│           └── send-response.ts
├── .env.example
├── .gitignore
├── eslint.config.mjs
├── package.json
├── tsconfig.json
└── README.md
```

---

Generated with [StackKit](https://github.com/tariqul420/stackkit) — `npx stackkit@latest create`
