Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@forwardimpact/libhttp

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forwardimpact/libhttp

HTTP service framework — ship a Hono service endpoint without reimplementing lifecycle, security headers, or health checks.

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
115
Maintainers
1
Weekly downloads
 
Created
Source

libhttp

HTTP service framework — ship a Hono service endpoint without reimplementing lifecycle, security headers, or health checks.

Getting Started

createHttpService owns the transport boilerplate (security headers, body limit, error envelope, /health, port binding, graceful stop()). The service mounts its routes through the configure callback:

import { createHttpService } from "@forwardimpact/libhttp";

const service = createHttpService({
  name: "example",
  config, // { host, port }
  logger,
  configure(app) {
    app.get("/hello", (c) => c.json({ hello: "world" }));
  },
});

await service.start();
// service.address() -> { port }
// service.stop()    -> graceful shutdown (runs optional onStop first)

Signal handling stays in the entry point (server.js), not the library:

for (const sig of ["SIGINT", "SIGTERM"]) {
  process.on(sig, () => service.stop());
}

Keywords

http

FAQs

Package last updated on 31 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts