Skip to content

Instantly share code, notes, and snippets.

@jaraco
Created January 9, 2019 22:14
Show Gist options
  • Save jaraco/dff4968715f64a2dae4fa8541670930b to your computer and use it in GitHub Desktop.
Save jaraco/dff4968715f64a2dae4fa8541670930b to your computer and use it in GitHub Desktop.
__requires__ = ['cherrypy']
import cherrypy
class Server:
@classmethod
def run(cls):
config = {
'global': {
'server.socket_host': '::',
'server.socket_port': 0,
}
}
cherrypy.quickstart(cls(), config=config)
@cherrypy.expose
def index(self):
return "Hello World!"
__name__ == '__main__' and Server.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment