local task

Host your app on Railway with its own database, and put its address in your production config.

Pass criterion: `shopify.app.production.toml` has your Railway address as `application_url`, and your app answers at that address.
$ npx @learnshopifydev/cli check host-your-app
1. Put your code on GitHub

Create an empty private repository, then run the commands GitHub shows under "push an existing repository from the command line".

2. Create a second Railway project from that repository

Click New Project, choose GitHub repo, pick your repository, and choose Add variables.

3. Add a PostgreSQL database to this project

Click `+ New`. This is the live database, and only your app in this project can reach it.

4. Give your app an address

In your app's service, open Settings, then Networking, and click Generate Domain. Copy the address.

5. Print your production app's settings

It prints three lines. They go into Railway and nowhere else.

6. Set the variables on your app's service, then deploy

On the Variables tab, open the RAW Editor, paste these lines with your own values, and click Deploy.

7. Put the address in `shopify.app.production.toml`

Replace the `application_url` and `redirect_urls` lines that are in the file. Then commit and push: `git add -A`, `git commit -m "Production address"`, `git push`.

0 / 1 task solved