jhen0409 / remotedev-rn-debugger

Injecting remotedev-app monitor into official Remote debugger of React Native. (formerly remote-redux-devtools-on-debugger)
MIT License
244 stars 28 forks source link

Inject runserver code to react-native local server #8

Closed jhen0409 closed 8 years ago

jhen0409 commented 8 years ago

It will be more convenient to start ReactNative local server and RemoteDev local server, just need one command.

Like $ remotedev-debugger --hostname localhost --port 5678 --injectserver, will add runserver code to startServer function of react-native/local-cli/server/server.js:

......
function startServer(args, config) {
  /* remote-redux-devtools-on-debugger start */
  require('remote-redux-devtools-on-debugger')({
    hostname: 'localhost',
    port: 5678,
    runserver: true
  });
  /* remote-redux-devtools-on-debugger end */
  runServer(args, config, () =>
    console.log('\nReact packager ready.\n')
  );
}
......