Skip to main content
2
Authorize Railway to access your GitHub repository.
3
Click the “New” button.
Firebase
4
Click the “Deploy from Github Repo” button.
Firebase
5
Pick the repository you want to deploy.
Firebase
6
After you pick the repository, you need to abort the deployment.Because we need to import our .env variables into the Railway project.
Firebase
7
Now, click the Variables section and then click the “Raw Editor” button.
Firebase
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.
Firebase
9
As you can see, the variables are imported successfully. But not done yet.
Firebase
10
Now click the “New Variable” button.
Firebase
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.
Firebase
12
Now, we are ready to deploy the backend.
Firebase
13
After successfully deploying the backend, go to the settings section and click the “Generate Domain” button.
Firebase
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.
Firebase
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.
Firebase
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.
Firebase
17
Some of the results are shown below.
FirebaseFirebase