Created
January 9, 2019 22:14
-
-
Save jaraco/dff4968715f64a2dae4fa8541670930b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__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