Deploy a React Native app to revenexx Storefronts
Learn how to setup and deploy React Native apps on revenexx Storefronts.
Create React Native app
First, create a React Native app.
Open your terminal, and run the following command.
Bash
npx create-expo-app my-app
Once the app is created, navigate to the project directory, open the package.json file and add the following line under scripts:
JSON
"build": "expo export --platform web"
Push this project to a GitHub repository.
Sign in to Cockpit
Open Cockpit and select the tenant you're deploying for. If this is your first time using revenexx, create your account first.
Create site
In Cockpit, go to Experience Studio → Sites, create a new site, and choose the Git path.
Connect your GitHub account and select the repository you intend to deploy (or allow all repositories, for future ease).
- Select the production branch and root directory from your repo.
- Verify that the correct framework is selected. In case an incorrect framework is visible, pick React Native from the drop-down list.
- Confirm the install command, build command, and output directory in the build settings. The default build settings for React Native are:
- Install command:
npm install - Build command:
npm run build - Output directory:
./dist
- Install command:
- Add any environment variables required by the storefront. This is not necessary if you're deploying the starter app.
Click on the Deploy button.
Visit site
After successful deployment, click on the Visit site button.