# TypeScript Express App

<p>
  <a href="./README.md">English</a>
  ·
  <a href="./README.zh-TW.md">繁體中文</a>
  ·
  <a href="./README.zh-CN.md">简体中文</a>
</p>

A lightweight Express 5 application generated by `create-typescript-express`.

## Features

- Express 5 with TypeScript strict mode.
- Node 24 LTS baseline and npm lockfile.
- `@/*` import alias for internal TypeScript modules.
- `tsx` watch mode for local development.
- ESLint, Prettier, `node:test`, and Supertest.
- Pug views, static assets, `.env.example`, Dockerfile, and GitHub Actions CI.

## Getting Started

Use Node 24. This project includes `.nvmrc` and `.node-version` files for version managers. Switch to Node 24 before installing dependencies or running checks.

```bash
fnm use || nvm use
npm install
npm run dev
```

Open `http://localhost:8000`.

## Scripts

```bash
npm run dev          # Start the TypeScript dev server
npm run typecheck    # Check TypeScript types without emitting files
npm run lint         # Run ESLint
npm run format:check # Check Prettier formatting
npm test             # Build and run HTTP tests
npm run build        # Compile TypeScript, rewrite aliases, and copy static assets
npm run check        # Run the full local quality gate
```

## Routes

- `GET /` returns the starter greeting.
- `GET /health` returns a JSON health response.
- Unknown routes render the Pug error view with a 404 status.

## Docker

```bash
docker build -t typescript-express-app .
docker run --rm -p 8000:8000 typescript-express-app
```

## Project Structure

```text
.
├── .node-version
├── .nvmrc
├── app.ts
├── bin/server.ts
├── routes/
├── test/
├── views/
├── public/
├── Dockerfile
└── .github/workflows/ci.yml
```

## Next Steps

Add only the pieces your application needs: validation, persistence, authentication, OpenAPI, queues, or background workers. Keeping the base small makes the first clone easy to understand and maintain.

## License

MIT License. See [LICENSE](./LICENSE).
