How can I get built-in WebServer to be accessible by others on my network??

I'm using PyCharm 2016.1 to build my AngularJS application.

Pycharm has a nifty built-in webserver which serves my application here: http://localhost:63342/index.html#

I would like to provide someone else my current IP address so that they can visit http://WWW.XXX.YYY.ZZZ:63342/index.html$ and get served the app. However Pycharm's webserver only serves it to HTTP requests coming from localhost -- not outside.

 

How do I chnge the webserver settings so that it serves the app to users not coming from localhost?

3 comments

Your question on StackOverflow said "on the Internet". But your question here says "on my network". The former opens up a bunch of networking issues that are independent of PyCharm and Python, involving either your router or something like localtunnel. It's a hard topic, but that's a good thing...you really don't want the outside world to easily get to your computer.

0

Just on my network. Sorry for the confusion.

0

In that case, follow the instructions from the answers to your StackOverflow about editing the configuration and setting the hostname to 0.0.0.0. Then, hand out your IP address as the hostname.

This is obviously cumbersome (getting a 4-octet IP address.) It's possible that your network has an internal DNS setup, so you could use that, or if you are all Macs, then you could use your Bonjour name.

Your final challenge...this might not work across routers inside your network. If one person is on a different WiFi access point, for example, they might run into difficulties, depending on how your organization's networking is setup.

All in all, while PyCharm has some role in this, most of the challenge is in networking. You could eliminate PyCharm from the equation by setting up a regular web server and ensuring that it works. Once that is confirmed, adding PyCharm to the mix.

0

Please sign in to leave a comment.