otok-adapter-node
v2.1.0
Published
Node.js deployment adapter for Otok with standalone server builds, static assets, and graceful shutdown.
Downloads
368
Readme
otok-adapter-node
Node.js deployment adapter for Otok.
Usage
import { defineConfig } from "@kamod-ch/otok";
import node from "otok-adapter-node";
export default defineConfig({
adapter: node({
outDir: "dist",
port: 3000,
host: "0.0.0.0",
}),
});Features
- Standalone server build (
dist/server/server.js) - Configurable
HOSTandPORTat runtime - Immutable cache headers for hashed assets
- Graceful shutdown on
SIGTERM/SIGINT - Full Node.js environment access (
process.env, filesystem)
Operations
Docker
See examples/adapters/node/Dockerfile.
systemd
[Service]
Environment=NODE_ENV=production
Environment=PORT=3000
ExecStart=/usr/bin/node dist/server/server.js
KillSignal=SIGTERMCapabilities
node-apis, filesystem, process-env, graceful-shutdown, ssr, streaming, middleware, server-actions, islands, static-assets
