Install the server and app
Place the mobile client in app/ alongside server/. With a web client, follow the Gravity setup wizard. For a mobile-only install, configure your database and mail settings in the server’s .env and config/default.json first. The setup script defaults to MySQL.
From server/, run:
npm run setup
The server’s setup script installs the dependencies and sets app/config.json’s baseURL to a local network address on port 8080. Check that your device can reach that address. The mobile-only database setup reads the driver from the argument to bin/setup.js; the packaged npm setup command invokes that script without a driver argument. For alternative database setup with the web client, use the wizard.
Run the development apps
Run npm run dev from server/ to start the API and the sibling clients that are installed. If the API is already running, start only the Expo development server from app/:
npm start
Press a to open Android or i to open the iOS simulator. For push notifications, put your Expo project ID in app/app.json under expo.extra.eas.projectId and use a physical device.
For social sign-on, configure the provider credentials and callback URL on the server. If you use a development tunnel, set the app’s API base URL to the reachable server address.