Closed
Description
Consider this script:
__requires__ = ['cherrypy']
import os
import cherrypy
class Server:
@cherrypy.expose
def index(self):
return cherrypy.url('/foo/')
@classmethod
def run(cls):
config = {
'global': {
'server.socket_port': int(os.environ.get('PORT', 8080)),
'tools.proxy.on': True,
},
}
cherrypy.quickstart(cls(), config=config)
__name__ == '__main__' and Server.run()
Run it and request /
and you'll get:
$ curl http://localhost:8080/
http://localhost:8080:8080/foo/
Metadata
Metadata
Assignees
Labels
No labels