Setting Up NativeExpress
Prerequisites
Before you begin, ensure you have the following installed on your system:
- Node.js (opens in a new tab) (v20 or later)
- yarn (opens in a new tab)
- Git (opens in a new tab)
- Homebrew (opens in a new tab)
- EAS CLI (opens in a new tab)
- Apple Developer Account (opens in a new tab)
- Android Developer Account (opens in a new tab)
- Expo Account (opens in a new tab)
Setup Options
Quick Start Wizard
Complete the following steps to configure your app. The wizard will generate a single CLI command with all your configurations included.
Interactive CLI
Alternatively, if you prefer to configure everything step by step through the CLI prompts, you can use:
npx nativeexpress create-app my-app-name
This will guide you through various configuration options interactively.
Run the Development Server
Create a prebuild for iOS
Run the following command in your terminal (remove the --platform
flag if you want to build for both platforms):
npx expo prebuild --platform ios
Install Pods
Run the following command in your terminal:
cd ios && pod install
Create a development build for iOS
Run the following command in your terminal:
npx expo run:ios
Start the development server
You can now start and ran the app on the simulator any time you want Run the following command in your terminal:
npx expo start -d
You are now ready to explore the other features of NativeExpress and start building your application!
Database Setup
When you first set up your app, the database will be empty. If you want to populate it with example data and apply initial migrations, you'll need to set up the database. If you prefer to start with an empty database, you can skip this step.
For more detailed information about database management, please refer to the Database Guide.
Run Database Migrations and Seed Data
To initialize your database with migrations and seed data, use one of the following commands in your terminal:
For a linked Supabase project:
supabase db reset --linked
This command will reset your database, apply all migrations, and run the seed.sql file for the linked project.
For a local Supabase project:
supabase db reset
If you're using a local setup, make sure to adjust your .env.local file to connect with the local database before running this command.