@open-matrix/hosting-node (0.1.7)
Installation
@open-matrix:registry=npm install @open-matrix/hosting-node@0.1.7"@open-matrix/hosting-node": "0.1.7"About this package
@open-matrix/hosting-node
Node.js leaves for @open-matrix/hosting.
The neutral host package deliberately contains no process or Node built-in
imports. This package supplies the Bridge from IHostLifetime to Node process
signals.
const builder = Host.CreateApplicationBuilder();
AddNodeProcessLifetime(builder.Services);
await using host = builder.Build();
await host.RunAsync();
NodeProcessLifetime requests cooperative host shutdown on SIGINT or
SIGTERM. It does not call process.exit() and does not own transport,
telemetry, package, or actor resources. Those resources remain hosted-service
responsibilities and stop in reverse registration order.
Deliberate policy boundary
A second signal does not force immediate process termination. Escalation is an executable-edge policy because the correct response depends on whether the process is supervised by systemd, HiveDock, a test harness, or another embedder. The reusable lifetime adapter only requests application shutdown once.
Dependencies
Dependencies
| ID | Version |
|---|---|
| @open-matrix/hosting | 0.1.7 |
Development Dependencies
| ID | Version |
|---|---|
| @types/node | ^20.0.0 |
| typescript | ^5.7.0 |