@lumiose/adapter-node
v0.8.1
Published
Serve a Lumiose build with Node: dist/client statics with caching headers, then the app's fetch handler.
Readme
@lumiose/adapter-node
Serves a Lumiose build with Node: the static files of dist/client
(with their compressed copies and caching headers), then the app's request handler, with streamed
responses. lumiose preview uses it too.
pnpm add @lumiose/adapter-node// server.ts
import { createServer } from "@lumiose/adapter-node";
const { url } = await createServer({ dir: new URL("dist", import.meta.url) });
console.log(`Listening on ${url}`);Run lumiose build, then node server.ts. It reads PORT, HOST and ORIGIN.
API: @lumiose/adapter-node reference.
Deploying: VPS,
Docker.
