Commits

Anonymous committed 65e2c57

First version

Comments (0)

Files changed (1)

+import cherrypy
+
+def requesthandler(*pathargs, **kwargs):
+    cherrypy.response.status = "500 Server Error"
+    return "Not implemented"
+
+
+class PyRest(object):
+
+    def index(self, *args, **kwargs):
+        return requesthandler(*args, **kwargs)
+    index.exposed = True
+    
+
+CONF = {
+    'global': {
+        'server.socket_host': '0.0.0.0',
+        'server.socket_port': 8888,
+    }
+}
+
+
+if __name__ == '__main__':
+    ROOT = PyRest()
+    cherrypy.quickstart(ROOT, '/', CONF)
+    
+def application(environ, start_response):
+  cherrypy.tree.mount(PyRest(), '/', None)
+  return cherrypy.tree(environ, start_response)