sergey icon indicating copy to clipboard operation
sergey copied to clipboard

Running on 0.0.0.0

Open mas-4 opened this issue 5 years ago • 2 comments

Hi,

I was wondering if there is an option, or if it would be an enhancement, to run the dev server on 0.0.0.0? I tend to develop in PuTTy from a Windows machine which requires I run any dev servers on a network. I didn't see anything but the option to change the port in the options on the sergey.cool site.

This would be a massive help. Thanks.

mas-4 avatar Jun 23 '20 17:06 mas-4

Update: I did some investigation myself (figured the code couldn't be too challenging) and it appears that connect().listen() defaults to listen on any port (0.0.0.0). It would be fairly trivial to add a HOST parameter to your code if you'd prefer to actually default to localhost and allow people to specify the host if they would like 0.0.0.0. This might actually be considered a security risk.

I could write the PR if you'd like.

mas-4 avatar Jun 23 '20 17:06 mas-4

I already wrote it. Sorry if that seems a little forward.

https://github.com/trys/sergey/pull/52

mas-4 avatar Jun 23 '20 17:06 mas-4