-
Sign up and log in to Fly
flyctl auth signup
- Create Fly application. We don't want to deploy yet as we have to add volumes for SQLite.
flyctl launch --region ord --no-deploy
- Add volumes to your app in two regions
flyctl volumes create --region ord --size 1 data
flyctl volumes create --region hkg --size 1 data
- Scale your app to match the number of volumes you have added
flyctl scale count 2
- Deploy your app from the CLI the first time
flyctl deploy --remote-only
From your terminal:
npm run dev
This starts your app in development mode, rebuilding assets on file changes.
If you've followed the setup instructions already, all you need to do is run this:
npm run deploy
You can run flyctl info
to get the url and ip address of your server.
Check out the fly docs for more information.