http/fastify
Fastify HTTP server with structured logging, a health check and a versioned route prefix.
Provides: http, http:fastify
Requires: runtime:node, config:env
Conflicts with: http
Files it writes
src/app.ts|js
Dependencies
fastify@^5.6.1
Environment
| Variable | Required | Description |
|---|---|---|
PORT | no | Port the HTTP server listens on |
What it contributes to other files
| File | Slot | Line |
|---|---|---|
src/config/env.ts|js | env-schema | PORT: z.coerce.number().int().positive().default(3000), |
src/index.ts|js | imports | import { app } from './app.js'; |
src/index.ts|js | imports | import { env } from './config/env.js'; |
src/index.ts|js | bootstrap | await app.listen({ port: env.PORT, host: '0.0.0.0' }); |
Use it
atarashi new my-app --add http/fastify
atarashi add http/fastify
Version 1.0.0. Format reference: Authoring blueprints.
Part of the atarashi documentation, written and maintained by Gautam Suthar.