Update README for injectserver
This commit is contained in:
parent
168206b9e0
commit
f371a43f86
28
README.md
28
README.md
@ -38,6 +38,34 @@ remotedev --hostname=localhost --port=8000
|
||||
|
||||
Change `hostname` and `port` to the values you want.
|
||||
|
||||
### Inject to React Native local server
|
||||
|
||||
##### Add in your React Native app's `package.json`:
|
||||
|
||||
```
|
||||
"scripts": {
|
||||
"remotedev": "remotedev --hostname=localhost --port=8000 --injectserver=reactnative"
|
||||
}
|
||||
```
|
||||
|
||||
The `injectserver` value can be `reactnative` or `desktop` ([react-native-desktop](https://github.com/ptmt/react-native-desktop)), it used `reactnative` by default.
|
||||
|
||||
Then, we can start React Native server and RemoteDev server with one command:
|
||||
|
||||

|
||||
|
||||
##### Revert the injection
|
||||
|
||||
Add in your React Native app's `package.json`:
|
||||
|
||||
```
|
||||
"scripts": {
|
||||
"remotedev-revert": "remotedev --revert=reactnative"
|
||||
}
|
||||
```
|
||||
|
||||
Or just run `$(npm bin)/remotedev --revert`.
|
||||
|
||||
### Connect from Android device or emulator
|
||||
|
||||
If you're running an Android 5.0+ device connected via USB or an Android emulator, use [adb command line tool](http://developer.android.com/tools/help/adb.html) to setup port forwarding from the device to your computer:
|
||||
|
Loading…
x
Reference in New Issue
Block a user