Skip to content
atarashi
Documentation menu

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

VariableRequiredDescription
PORTnoPort the HTTP server listens on

What it contributes to other files

FileSlotLine
src/config/env.ts|jsenv-schemaPORT: z.coerce.number().int().positive().default(3000),
src/index.ts|jsimportsimport { app } from './app.js';
src/index.ts|jsimportsimport { env } from './config/env.js';
src/index.ts|jsbootstrapawait 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.