# <%= appTitle %>

> Generated by `lhx-cli create --template=service` on <%= year %>.

A TypeScript service. The web framework is selected at scaffold time via
`--features` (Express is default). Database, cache, Docker, and structured
logging are wired in at scaffold time.

## Quick start

```bash
cp .env.example .env
pnpm install
pnpm dev          # starts on http://localhost:3000
curl http://localhost:3000/health
```

## Scripts

| Script | What it does |
| --- | --- |
| `pnpm dev` | tsx watch (auto-reload on edits) |
| `pnpm build` | `tsc` → `dist/` |
| `pnpm start` | `node dist/server.js` (prod) |
| `pnpm typecheck` | tsc --noEmit |
| `pnpm lint` | biome check |

## Docker

```bash
docker compose up --build
```

`docker-compose.yml` includes the database / cache services that match the
`db-*` / `cache-*` features you selected at scaffold.

## Structure

```
src/
├── server.ts       # entry — wires app + graceful shutdown
├── app.ts          # framework app factory; middlewares + routers
├── env.ts          # zod-validated env (parses on import)
├── logger.ts       # pino logger (pretty in dev)
└── routes/
    └── health.ts   # GET /health endpoints
```

## Resources

- 🐛 https://github.com/juwenzhang/lhx-kit/issues
- 📖 https://juwenzhang.github.io/lhx-kit/
