Skip to content

Stormkit

--preset stormkit writes the layout Stormkit reads by default. It is chosen when STORMKIT is set, or by name.

Reference

Presetstormkit
Runs onStormkit
event.runtime.namestormkit
Server targetnode
Lifetime, startuprequest, request

Output

text
.stormkit/
  public/                              the public files and /_hamur/, under app.baseURL
  server/index.mjs                     export { handler }

Config keys

This preset has no key of its own.

Detection

The build selects it when STORMKIT is set, unless --preset, preset or HAMUR_PRESET names another. It is a row of the one table of markers in Choosing a preset.

Deploy command

No hamur deploy command: it exits 1 for this preset. Stormkit builds and deploys from the repository.

Limits

  • Experimental: streamed answers, private app/env.ts entries read at run time.
  • Does not run: WebSockets and server.syncedState, server.pubsub, server.metrics, image transforms at run time, Durable Object classes.

The levels are the features of the preset: hamur build warns or fails when the app uses a feature the preset does not run (see Preset features).

text
.stormkit/
  public/                              the public files and /_hamur/, under app.baseURL
  server/index.mjs                     export { handler }

handler(event, context) is the function Stormkit's @stormkit/serverless wrapper produces: event is { url, path, method, body, headers } and the answer is { statusCode, headers, body }, or buffer (base64) for a binary body. A body over server.maxRequestBodySize is answered 413. Do not set an output folder in Stormkit: it takes precedence over .stormkit/.