Skip to content
Jupiter documentation
Menu

Install and run

Set up the worker locally with a D1 database, seed data and a running dev server.

You need Node.js 20 or newer and npm. The steps below give you a worker on http://localhost:8787 with a local D1 database and a seeded demo user.

Install dependencies#

npm install runs wrangler types, which generates worker-configuration.d.ts from wrangler.jsonc and .dev.vars.

Configure secrets#

.dev.vars holds SECRET_KEY, the HMAC key for login tokens. wrangler dev loads it automatically and never commits it. Set a different value for anything you keep.

Create the database#

The first command applies migrations/*.sql to the local D1 database. The second loads seed.sql: two recipes with ingredients, week 46 with both recipes mapped, one customer review, and the accounts user / password (API user) and alice / password (customer).

Start the worker#

wrangler serves the worker and the local database. Check it is up:

Log in#

Source: belikh/hello-fresh-API HEAD