I have been experimenting with Python as a server side language. In particular, I am looking at microframeworks (because that seems to be the cool thing these days).
I took a stab at using several frameworks. The following example I am using uses itty.
$ python hello_world.py
itty starting up (using wsgiref)...
Listening on http://0.0.0.0:5000
Use Ctrl-C to quit.
This works perfectly fine. I hit http://0.0.0.0:5000
and it works. But now I am having trouble understanding how to do the same thing on my web host. I can hit my website (e.g. foo.com) perfectly fine, but after I run hello_world.py, I am unable to hit the corresponding URL (i.e. foo.com:5000).
How do I hit the URL with a corresponding port? Can I do it without specifying port (e.g. bar.foo.com => foo.com:5000)?
Should I even be forwarding the port? Is there another way for me to accomplish my goal (i.e., hit the webpage generated by Python)?
How do I even tell if I have the permission to make these changes? My webhost is 1and1, if that helps.
If I am not able to accomplish this on my webhost, how can I do it on a server where I have more control (e.g. an EC2 instance)? (I'm also unsure, but I think this question might be relevant)
I have minimal working knowledge of ports and routing, so any knowledge or resources are very much appreciated.