Stormkit
--preset stormkit writes the layout Stormkit reads by default. It is chosen when STORMKIT is set, or by name.
Reference
| Preset | stormkit |
| Runs on | Stormkit |
event.runtime.name | stormkit |
| Server target | node |
| Lifetime, startup | request, request |
Output
.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.tsentries 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).
.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/.