react-native-community / discussions-and-proposals

Discussions and proposals related to the main React Native project
https://reactnative.dev
1.68k stars 127 forks source link

is there a way to specify "Debug server host & port for device" in the command line at startup. #765

Closed alainib closed 8 months ago

alainib commented 8 months ago

each time i run my app in local with runandroid or runios
i have to shake device or open Dev menu and manually set "change Bundle location" for ios / android or metro doesn't connect and i don't have live reload.

my alias in zhrc

alias runandroid= yarn run android:envdev-debugbuild --active-arch-only
alias runios= yarn run ios:envdev-debugbuild

Discussion points

is there a way to set them on startup ( path param with localhost:8081/index) ?

thanks

kelset commented 8 months ago

👋 there - as stated in the README and the issue template, this repo is for long-form discussions. Yours seems more a question for StackOverflow instead.

alainib commented 8 months ago

maybe

DEBUG_HOST=127.0.0.1:8081 ENVFILE=.env.development npx react-native run-android --mode=developmentdebug --port 8081