2

Authorize Railway to access your GitHub repository.

3

Click the “New” button.

4

Click the “Deploy from Github Repo” button.

5

Pick the repository you want to deploy.

6

After you pick the repository, you need to abort the deployment.

Because we need to import our .env variables into the Railway project.

7

Now, click the Variables section and then click the “Raw Editor” button.

8

Copy the .env variables from the [your-app-name]-backend/.env.production file and paste it into the Railway project.

Then click Update Variables.

9

As you can see, the variables are imported successfully. But not done yet.

10

Now click the “New Variable” button.

11

Name should be FIREBASE_SERVICE_ACCOUNT and the value should be the content of the [your-app-name]-backend/firebase-service-account.json file.

Click the Add button.

12

Now, we are ready to deploy the backend.

13

After successfully deploying the backend, go to the settings section and click the “Generate Domain” button.

14

After generating the domain, you can add it to the Expo environment variables. (Especially for the .env.production file)

You can run it with ngrok or localhost on dev mode.

Copy the domain and paste it into the .env.production file.

15

When you want to publish your app, it is okey to go with that.

But in development, you don’t need to deploy the backend.

16

Open Expo App and try something. (I have all API keys so I can try everything)

As you can see, our request is successfully sent to the backend.

17

Some of the results are shown below.