mirror of
https://github.com/status-im/status-react.git
synced 2025-01-09 10:42:53 +00:00
89828ba7fd
This change will now allow for customizing the port number when running the metro server. The environment variable `RCT_METRO_PORT` can now be set when executing commands like `make run-ios`, `make run ios-device`, and `make run-android`. Though, it should be noted that `make clean` may need to be ran before attempting to set or change `RCT_METRO_PORT` since the react-native app will have statically built code that references the value of RCT_METRO_PORT from compile time and not runtime.
9 lines
288 B
Bash
Executable File
9 lines
288 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
if pgrep -f "react-native start --port=${RCT_METRO_PORT:-8081}" > /dev/null; then
|
|
echo "Info: metro is already running in another terminal"
|
|
else
|
|
echo "Info: starting a new metro terminal"
|
|
react-native start --port=${RCT_METRO_PORT:-8081} --reset-cache
|
|
fi
|