Skip to main content

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 with read: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 to wrangler.jsonc under [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 before wrangler dev starts.
If the app uses a different verifier, follow its README and Environment Verification Setup.

6. Start the local dev server

The Worker is available at http://localhost:8787.

7. Verify the health endpoint

8. Running tests

9. TypeScript typecheck

Troubleshooting