Host/port binding and reverse proxy - #29
Conversation
|
Thank you! I'll take a look and merge it on weekend. |
There was a problem hiding this comment.
these two dashes at the beginning - that's a typo, right?
There was a problem hiding this comment.
Sorry for taking so much time to answer. :(
Nope, it is not a typo. They're necessary to propagate the command line arguments to electron.
$ npm start -- --proxy-port=8010 --proxy-host=0.0.0.0 --reverse-proxy=http://127.0.0.1:8081
> betwixt@0.0.0 start /home/mau/dev/betwixt
> electron main.js "--proxy-port=8010" "--proxy-host=0.0.0.0" "--reverse-proxy=http://127.0.0.1:8081"
From https://docs.npmjs.com/cli/run-script:
As of npm@2.0.0, you can use custom arguments when executing scripts. The special option -- is used by getopt to delimit the end of the options. npm will pass all the arguments after the -- directly to your script
There was a problem hiding this comment.
Thanks for explanation, I didn't know that!
|
From what I've tested it works great. Please fix mentioned docs typo and I'll merge it. |
|
@kdzwinel, not sure if you still want to merge this PR. Anyway, please let me know if you want me to rebase the branch. |
|
@mhnagaoka this time it took me a while to get back to you, sorry! The answer is: yes, absolutely! However, since I had to switch to mitm-proxy in order to support HTTPS (#31 - I'll merge it this week) you should rebase against that branch. It might be a bit challenging though (not sure how reverse proxy works with mitm-proxy), so if you won't find time to do it then I'll try. |
|
Guys, it is 2018 here :) |
--proxy-hostand--proxy-port);--reverse-proxy).