Getting Started Runbook
This runbook covers local development setup for a Factory app Worker.Prerequisites
- Node.js 20+
- Wrangler CLI (
npm install -g wrangler) - Access to the GitHub Packages registry (
@latimer-woods-tech/*) - Neon Postgres connection string (or access to factory-admin to retrieve it)
1. Clone the repo
2. Authenticate with GitHub Packages
Create (or reuse) a GitHub Personal Access Token withread:packages scope.
3. Install dependencies
4. Create .dev.vars
Wrangler loads .dev.vars as secrets during wrangler dev. Never commit this file.
For app-specific bindings (Hyperdrive, KV, R2), add them towrangler.jsoncunder[dev]bindings or use remote dev mode (wrangler dev --remote).
5. Verify local environment configuration
Before starting the Worker, run the app’s environment verification if it exists. This catches missing bindings, wrong secret names, and environment mixups beforewrangler dev starts.
6. Start the local dev server
http://localhost:8787.