Deploy from the command line
Use this path if you prefer a terminal. You need Bun, Node 20 or newer, and a Cloudflare account.
git clone https://github.com/homielab/noteflarecd noteflarebun installbunx wrangler loginbun run deploybun run deploy builds the app, deploys the Worker (creating the D1 database on the first run) and applies the database migrations.
Then turn on Cloudflare Access. Set the variables in wrangler.jsonc on your computer and run bun run deploy again.
Develop locally
Section titled “Develop locally”cp dev.vars.sample .dev.vars # DEV_USER_EMAIL=you@example.com, local onlybun run db:migrate:localbun run dev:api # terminal 1: Worker + local D1 on :8787bun run dev # terminal 2: Vite on :5173, proxies /apibun run testDEV_USER_EMAIL is honored only while the Access variables are empty and the request is to localhost, so it can never open a deployed app.
The service worker exists only in production builds. To try offline mode locally, run bun run build && bun run dev:api and open http://localhost:8787.