Issue by linonetwo
_Saturday Dec 17, 2016 at 07:06 GMT_
_Originally opened as https://github.com/storybooks/react-native-storybook/issues/116_
I use wifi to sent bundle, in Dev settings, I set Debug server host to 10.0.0.90:8081, and bundle was sent. But socket seems still try to connecting 127.0.0.1:7007.
I think socket should read Dev setting, and try to connect 10.0.0.90:7007 if I have set it.
Seems running "storybook start -h 10.0.0.90 -p 7007" can't help.
Comment by linonetwo
_Saturday Dec 17, 2016 at 07:20 GMT_
Ok, seems using:
const StorybookUI = getStorybookUI({port: 7007, host: '10.0.0.90'});
can do this.
Comment by linonetwo
_Saturday Dec 17, 2016 at 07:21 GMT_
But I think it's better to read Dev settings...Since this is config, prefer not hardcoded.
Comment by linonetwo
_Saturday Dec 17, 2016 at 07:30 GMT_
Well, after searching. I still don't know how to read Dev settings, or I could have made a PR...
Tell me if anybody know the way to do this.
Comment by mnmtanish
_Monday Dec 19, 2016 at 04:48 GMT_
Hi @linonetwo
Thanks for opening the issue. If you find a way to pass some config info into the React Native app at build time without hard coding it, please let me know. So far, the only I way I found is by dynamically generating a JS file when starting storybook and importing it into the RN app. I'm trying to find a better way to do this.
Comment by DandroidDeveloper
_Friday Jan 06, 2017 at 02:27 GMT_
In Android Studio on Ubuntu localhost needs to be changed to 10.0.2.2 in order for storybook to work, the emulator doesn't recognize localhost
Comment by linonetwo
_Friday Jan 06, 2017 at 07:11 GMT_
Nowadays I just read different config files when running by different npm script....
Comment by gourav-singhal
_Thursday Mar 09, 2017 at 13:02 GMT_
Hi
I am getting this same error I tried the solution as suggested by @linonetwo but still no success. Can anybody help ?
@mnmtanish Do you think there's something we still need to do here?
I'm pretty sure this is a duplicate: https://github.com/storybooks/storybook/issues/846
Please re-open if it isn't 馃憤
Most helpful comment
_Sunday Mar 12, 2017 at 04:55 GMT_
adb reverse tcp:7007 tcp:7007