Node.js server for Kori framework.
Wraps @hono/node-server for Kori applications.
npm install @korix/nodejs-server @korix/koriimport { createKori } from '@korix/kori';
import { startNodejsServer } from '@korix/nodejs-server';
const app = createKori();
app.get('/', (ctx) => {
return ctx.res.text('Hello, Kori!');
});
await startNodejsServer(app, {
hostname: 'localhost',
port: 3000,
});Starts a Node.js HTTP server for a Kori application.
kori- Kori application instanceoptions- Server options (optional)hostname- Hostname to bind to (default:'localhost')port- Port number to listen on (default:3000)
- Graceful shutdown handling (SIGINT/SIGTERM)
- Automatic logging of server startup and shutdown events
MIT