project.json:

{ "name": "mobile", //... "targets": { //... "start": { "executor": "@nrwl/expo:start", "options": { "port": 8081 } } //... } }
nx run mobile:start

Examples

The ios, android and web option allows you to start the server on different platforms.

Opens your app in Expo Go in a currently running iOS simulator on your computer:

"start": { "executor": "@nrwl/expo:start", "options": { "port": 8081, "ios": true } }

Opens your app in Expo Go on a connected Android device

"start": { "executor": "@nrwl/expo:start", "options": { "port": 8081, "android": true } }

Opens your app in a web browser:

"start": { "executor": "@nrwl/expo:start", "options": { "port": 8081, "web": true } }

Options

android

a
boolean

Opens your app in Expo Go on a connected Android device

clear

c
boolean

Clear the Metro bundler cache

dev

boolean

Turn development mode on or off

devClient

boolean

Experimental: Starts the bundler for use with the expo-development-client

forceManifestType

string
Accepted values: expo-updates, classic

Override auto detection of manifest type.

https

boolean

To start webpack with https or http protocol

host

string
Accepted values: localhost, lan, tunnel

lan (default), tunnel, localhost. Type of host to use. lan uses the local network; tunnel ues any network by tunnel through ngrok; localhost connects to the dev server over localhost.

ios

i
boolean

Opens your app in Expo Go in a currently running iOS simulator on your computer

lan

boolean

Same as --host lan

localhost

boolean

Same as --host localhost

maxWorkers

number

Maximum number of tasks to allow Metro to spawn

minify

boolean

Whether or not to minify code

offline

boolean

Allows this command to run while offline

privateKeyPath

string

Path to private key for code signing. Default: 'private-key.pem' in the same directory as the certificate specified by the expo-updates configuration in app.json.

port

p
number
Default: 19000

Port to start the native Metro bundler on (does not apply to web or tunnel)

scheme

string

Custom URI protocol to use with a development build

tunnel

boolean

Same as --host tunnel

web

w
boolean

Opens your app in a web browser