Summary: ^ Changelog: Remove RSocket documentation references Reviewed By: jknoxville Differential Revision: D34345316 fbshipit-source-id: 5b9fac8c04e325f3f02ef3713b0146b17e694c9d
74 lines
2.1 KiB
Plaintext
74 lines
2.1 KiB
Plaintext
---
|
|
id: custom-ports
|
|
title: Running Flipper with different ports
|
|
sidebar_label: Using different ports
|
|
---
|
|
|
|
## FLIPPER ports (mobile apps that support certificate exchange)
|
|
|
|
By default Flipper runs its servers on ports 9088 and 9089, and the mobile SDKs look for servers on those ports.
|
|
|
|
Each of these can be overridden by setting an environment variable, with the format `${INSECURE_PORT},${SECURE_PORT}`.
|
|
|
|
To run the desktop app using custom ports:
|
|
|
|
```
|
|
env FLIPPER_PORTS=1111,2222 ./flipper
|
|
```
|
|
|
|
or with a dev build:
|
|
|
|
```
|
|
env FLIPPER_PORTS=1111,2222 yarn start
|
|
```
|
|
|
|
To configure the Android SDK for custom ports, set the `flipper.ports` prop to your chosen ports `1111,2222` like so, and then launch the Android app:
|
|
|
|
```
|
|
adb shell su 0 setprop flipper.ports 1111,2222
|
|
```
|
|
|
|
To configure the iOS SDK for custom ports, set the FLIPPER_PORTS environment variable in your app launch script or set it system-wide through User Defaults:
|
|
|
|
```
|
|
xcrun simctl spawn booted defaults write "Apple Global Domain" "com.facebook.flipper.ports" -string "1111,2222"
|
|
```
|
|
|
|
## FLIPPER ports (apps that do not support certificate exchange)
|
|
|
|
Flipper listens on 8333 for insecure (browser, Node.js) connections.
|
|
|
|
To run the desktop app using custom ports:
|
|
|
|
```
|
|
env FLIPPER_BROWSER_PORT=1111 ./flipper
|
|
```
|
|
|
|
or with a dev build:
|
|
|
|
```
|
|
env FLIPPER_BROWSER_PORT=1111 yarn start
|
|
```
|
|
|
|
To connect to Flipper on a different port from [js-flipper](https://github.com/facebook/flipper/tree/main/js/js-flipper), you need to override its `urlBase` when you [start it](https://github.com/facebook/flipper/blob/0993d21f3b52d38969e4d2e330eb97ec4d840a9d/js/react-flipper-example/src/FlipperTicTacToe.tsx#L19).
|
|
|
|
```ts
|
|
flipperClient.start('React Tic-Tac-Toe', { urlBase: 'localhost:1111' });
|
|
```
|
|
|
|
## METRO SERVER PORTS
|
|
|
|
You can also setup Flipper to use a different Metro Server port (default=8081) using this environement variable:
|
|
|
|
```
|
|
METRO_SERVER_PORT=3333 ./flipper
|
|
```
|
|
|
|
## ADB REVERSE PROXY PORTS
|
|
|
|
And setup a different ADB port used for reverse proxying when plugged through USB (default=5037) using:
|
|
|
|
```
|
|
ANDROID_ADB_SERVER_PORT=4444 ./flipper
|
|
```
|