Examples
Examples
Examples
Standalone templates in examples/. Each is a normal project: copy the folder, install, build.
| Template | Shows |
|---|---|
hello |
Static, param and wildcard GET routes |
middleware |
app.use global and per-route middleware |
json-api |
POST body, onError, notFound |
router-mount |
app.route sub-router mounting |
sse-clock |
Server-sent events, see Streaming |
ws-echo |
@chttp/ws echo and room, see WebSocket |
vite-elf |
Vite with unplugin-scriptc |
vite-lowering |
Build-time route lowering, see Route lowering plugin |
deploy-docker |
Scratch image, see Deploy |
cd examples/hello
pnpm install
pnpm build # scriptc build src/main.ts -o app
./app # ELF listening on :3000
Full index: examples/README.md.