create-scratchwork-server
v0.3.0
Published
Scaffolds a self-hosted Scratchwork publishing server project (Cloudflare, AWS, or local).
Downloads
17
Readme
create-scratchwork-server
Scaffolds a standalone, self-hosted Scratchwork publishing server project:
npm create scratchwork-server my-server -- --platform cloudflarePlatforms:
cloudflare— a Cloudflare Worker backed by R2 and D1aws— an AWS Lambda Function URL backed by S3 and DynamoDBlocal— a single-machine Bun server with local file storage
The scaffolded project depends on the matching published
@scratchwork/server-deploy-* package (pinned to this package's version) and
contains the same files as the Scratchwork repository's own deploy projects:
a server-config.ts for domains and auth policy, platform configuration,
deploy.ts / local.ts entrypoints, a .env.example for secrets, and a
README with setup instructions.
cd my-server
bun install
bun run local # run the server locally
bun run deploy # deploy it (cloudflare and aws)The scaffolder is non-interactive when given a directory and --platform
(it prompts for the platform only on a TTY). Run with --help for usage.
