Skip to content

Instantly share code, notes, and snippets.

@zweite
Created April 28, 2017 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zweite/26e20623ba3a12f4fd497cbdbcc1e2fa to your computer and use it in GitHub Desktop.
Save zweite/26e20623ba3a12f4fd497cbdbcc1e2fa to your computer and use it in GitHub Desktop.
"""
web.py - specify address and port
"""
import web
class MyApplication(web.application):
def run(self, port=8080, *middleware):
func = self.wsgifunc(*middleware)
return web.httpserver.runsimple(func, ('0.0.0.0', port))
if __name__ == "__main__":
app = MyApplication(urls, globals())
app.run(port=8888)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment