You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory holds the code for the [Implement Mobile App with React Native, Expo, and Medusa](https://docs.medusajs.com/resources/storefront-development/guides/react-native-expo) guide.
4
+
5
+
This codebase only includes the express checkout storefront and doesn't include the Medusa application. You can learn how to install it by following [this guide](https://docs.medusajs.com/learn/installation).
6
+
7
+
## Installation
8
+
9
+
1. Clone the repository and change to the `react-native-expo` directory:
2\. Rename the `.env.template` file to `.env` and set the following variables:
17
+
18
+
```bash
19
+
EXPO_PUBLIC_MEDUSA_PUBLISHABLE_API_KEY=
20
+
EXPO_PUBLIC_MEDUSA_URL=
21
+
```
22
+
23
+
Where:
24
+
25
+
-`EXPO_PUBLIC_MEDUSA_URL` is the URL to your Medusa application server. If the Medusa application is running locally, it should be a local IP. For example `http://192.168.1.100:9000`.
26
+
-`EXPO_PUBLIC_MEDUSA_PUBLISHABLE_API_KEY` is the publishable key for your Medusa application. You can retrieve it from the Medusa Admin by going to Settings > Publishable API Keys.
27
+
28
+
3\. Install dependencies:
29
+
30
+
```bash
31
+
npm install
32
+
```
33
+
34
+
4\. While the Medusa application is running, start the Expo server:
35
+
36
+
```bash
37
+
npm run start
38
+
```
39
+
40
+
You can then test the app on a simulator or with [Expo Go](https://expo.dev/go).
41
+
42
+
## Testing in a Browser
43
+
44
+
If you're testing the app on the web, make sure to add `localhost:8081` (default Expo server URL) to the Medusa application's `STORE_CORS` and `AUTH_CORS` environment variables:
0 commit comments