Skip to content

Latest commit

 

History

History
26 lines (17 loc) · 681 Bytes

File metadata and controls

26 lines (17 loc) · 681 Bytes

Bundling and deployment

Run winterspec bundle -o dist/built.js. Then, depending on your target:

Node.js

Create an entrypoint.mjs file:

import { startServer } from "winterspec/adapters/node"
import bundle from "./dist/built"

startServer(bundle, { port: 3000 })

WinterCG (Cloudflare Workers/Vercel Edge Functions)

Create an entrypoint.mjs file:

import { addFetchListener } from "winterspec/adapters/wintercg-minimal"
import bundle from "./dist/built"
addFetchListener(winterSpec)

Because WinterCG doesn't allow imports, you'll need to bundle a second time with a tool like tsup: tsup entrypoint.mjs.