Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

localhost serve doesn't work (on Windows?) #470

Closed
simplynail opened this issue Mar 23, 2017 · 2 comments
Closed

localhost serve doesn't work (on Windows?) #470

simplynail opened this issue Mar 23, 2017 · 2 comments

Comments

@simplynail
Copy link

Hi there,
first of all - great work! I'm new to web programming and Hug eases stuff a lot!

I am having a problem running simple dev server on Windows.
I am simply running unmodified the code from:
https://github.com/timothycrosley/hug/blob/develop/examples/quick_server.py
and I get following error:

...
File "C:\Python34\WinPython-64bit-3.4.4.2Qt5\python-3.4.4.amd64\lib\socketserver.py", line 444, in server_bind
self.socket.bind(self.server_address)
OSError: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

Any thoughts on what may cause it?

@cag
Copy link
Contributor

cag commented Mar 23, 2017 via email

@simplynail
Copy link
Author

simplynail commented Mar 24, 2017

Fair enough, I didn't get any prompt from firewall that Python requests access to new port so didn't catch that. It works now, thanks!

BTW
is there some simple way to bind dev server to some other port than default 8000?
edit:
Yes, it is as easy as:
hug.API(__name__).http.serve(port=80)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants