Reference
Server API
Reference for server runtime and request helpers.
Server APIs configure how remote functions run Effect programs on the server.
ServerRuntime.make
import { ServerRuntime } from "svelte-effect-runtime/server";
ServerRuntime.make(layer);Registers the layer used by remote function handlers. Call it once from src/hooks.server.ts. The Vite plugin also rewrites server-side package-root imports to _server, but explicit _server imports make server-only examples clear.
RequestEvent
import { RequestEvent } from "svelte-effect-runtime/server";
const event = yield* RequestEvent;Reads the active SvelteKit request context inside a remote handler.