The Golden Rule: 🦸 🦸♂️ Stop starting and start finishing. 🏁
If you work on more than one feature at a time, you are guaranteed to multiply your bugs and your anxiety.
| command | description |
|---|---|
npm start |
starts the app - should only be used in production as changes will not get reloaded |
npm run start:watch |
runs the app using nodemon which watches for changes and reloads the app |
npm test |
runs the tests once |
npm run test:watch |
continually watches and runs the tests when files are updated |
npm run setup-db |
runs sql/setup.sql (use a local DB in dev, or set DATABASE_URL for Supabase) |
-
In Supabase, create a project. Copy Settings → Database → connection string (URI) for Node/pg.
-
In Supabase SQL Editor, run
sql/setup.sqlonce (or from this repo,npm run setup-dbwith thatDATABASE_URLin.env). -
Set
appinfly.tomlto a unique name (or runfly launchand merge the generatedfly.tomlif you prefer). -
Set secrets (replace with your values):
fly secrets set DATABASE_URL="postgresql://..." PGSSLMODE=require JWT_SECRET=... COOKIE_NAME=... SALT_ROUNDS=10 SECURE_COOKIES=true GH_CLIENT_ID=... GH_CLIENT_SECRET=... GH_REDIRECT_URI=... REDIRECT_URL=... API_URL="https://<your-app>.fly.dev" -
fly deploy -
Add your Fly app URL to
origininlib/app.js(CORS) and update the GitHub OAuth app redirect/callback + Netlify env if the public URL changed. -
When traffic looks good, delete the Heroku app and database add-on to stop billing.