nodejs-backend

Builds and reviews production Node.js HTTP services with Fastify, NestJS, Hono, or Express.

22|Updated Sep 10, 2026
One-click install
npx skills add https://github.com/Lynricsy/HyperSkills --skill nodejs-backend-lynricsy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nodejs-backend
Source: https://github.com/Lynricsy/HyperSkills/tree/main/skills/nodejs-backend
Command: npx skills add https://github.com/Lynricsy/HyperSkills --skill nodejs-backend-lynricsy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Node.js services fail in production through predictable mistakes: leaked stack traces in 5xx bodies, truncated responses on deploy, cross-request state leaks on singletons, unbounded memory from buffered payloads, and processes that never exit. This Skill encodes the invariants that prevent those failures and the framework-specific mechanics for Fastify, NestJS, Hono, and Express migrations. ## Core Features & Use Cases - Framework-aware guidance: Detects the framework from package.json and branches into dedicated references for Fastify (plugins, hooks, decorators, schemas), NestJS (modules, provider scopes, filters, lifecycle), Hono (middleware, validators, streaming), or Express-to-modern-framework migration. - 22 core invariants: Covers graceful shutdown ordering, error codes with cause chains, AsyncLocalStorage request context, schema-validated configuration, secret handling, stream backpressure, and event-loop blocking. - Five gated workflows: implement-endpoint, review-service, harden-for-deploy, diagnose-runtime, and migrate-from-express, each ending in a verifiable gate such as a proved drain test or a before/after metric. - Use Case: Before a Fastify service takes real traffic, run the harden-for-deploy workflow to trace the SIGTERM path end to end, verify readiness fails first, and confirm in-flight requests complete within the drain timeout. ## Quick Start Ask the assistant to review your Node.js service's package.json and server entry file for production-readiness issues before deploying it.

Frequently Asked Questions about nodejs-backend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement graceful shutdown in a Node.js service?

Graceful shutdown follows one path: stop accepting requests, drain in-flight work, close resources in reverse order of creation, then exit with a bounded timeout. In Fastify, awaiting app.close() handles the HTTP drain; calling process.exit() in a signal handler truncates in-flight responses.

How do I add request validation to Fastify routes?

Declare input and response schemas in the route options so Fastify compiles validation through Ajv and serialization through fast-json-stringify. For Zod projects, register fastify-type-provider-zod as the validator and serializer compiler instead of parsing inside handlers.

Why does my NestJS service leak state between concurrent requests?

Default-scoped NestJS providers are singletons, so a mutable field like currentUserId is shared by every concurrent request and overwritten mid-flight. Store request-scoped values in an AsyncLocalStorage context entered once per request rather than on the service instance.

Should I migrate from Express to Fastify, NestJS, or Hono?

Choose Fastify for JSON APIs wanting built-in validation and serialization, NestJS for large multi-team codebases needing enforced module boundaries, and Hono for small or edge-deployed services. Do the Express 4 to 5 step first, then move configuration, logging, and shutdown before porting routes.

Why does my Node.js process never exit after tests or shutdown?

A process that will not exit has open handles: unclosed connection pools, active timers, or listeners added per request. Ensure every resource created at startup has a matching close, and in NestJS call app.enableShutdownHooks() so onModuleDestroy runs on SIGTERM.

What are the limitations of Node.js type stripping for TypeScript?

Running .ts files directly requires Node 22.6+ with type stripping, and the files must avoid enums, namespaces, and parameter properties. Fastify code works because it needs no decorators, but decorator-based frameworks require a build step.