Installation

1. Add Database & Mailgun Settings

Navigate to the folder where you downloaded Gravity and open the /config/default.json. Next, add your database and Mailgun credentials.

It's important that you complete this step before proceeding.

2. Install the Expo Command-line Tool

The Expo CLI will enable you to perform a variety of Expo tasks, like running and building your app.

npm install --global expo-cli

3. Download the Expo Mobile Client

On your iOS or Android mobile device, visit the respective app store and download the Expo mobile client then register a free account.

4. Install Gravity Native

npm run setup

This will install all of the dependencies required and start your app. If you open the Expo mobile app or iOS or Android simulator, you'll be able to see your app.

Inside /app/config.json is a baseURL setting that points to the Gravity server for making API calls. During setup, this will be automatically set to your local network address but you should update this to point to your development server.

Running Your App

Finally, to run your app any time, enter the following command.

npm run dev

This will start both Gravity Server and the Expo client.

Running in a Simulator

Once your Expo server is running, you can open your app in the Android similar by pressing a or i to open the iOS simulator.