- Follow the "Create a project" steps for Supabase
- Get the connection string from the Supabase project settings
- Rename the
.env.devfile to.envand replace theDATABASE_URLwith the connection string from Supabase - Remember to change the password in the connection string!
- Run
npm run migrateto set up the database
Then, from your terminal:
npm run devThis starts your app in development mode, rebuilding assets on file changes.
Alternatively, for local-only development:
- Install the Supabase CLI and prerequisites (Docker)
- Rename the
.env.devfile to.env, keeping theDATABASE_URLpointing to localhost - Run
npm run migrateto set up the database
Then, from your terminal:
supabase start
npm run devThis starts your app in development mode, rebuilding assets on file changes.
-
Sign up and log in to Fly
flyctl auth signup- Setup Fly. It might ask if you want to deploy, say no since you haven't built the app yet.
flyctl launchIf you've followed the setup instructions already, all you need to do is run this:
npm run deployYou can run flyctl info to get the url and ip address of your server.
Check out the fly docs for more information.