I tried the method on http://flask.pocoo.org/snippets/24/ to make Flask work on CheryPy server and It worked, no problem so far. But I can't route anything else but the "/". For example if I want to route to localhost/xyz, It returns "Hello World".
Should I create single Flask app for every single path?
the server.py is:
from cherrypy import wsgiserver
from qwe import app
d=wsgiserver.WSGIPathInfoDispatcher({"/":app,"/xyz":app})
server=wsgiserver.CherryPyWSGIServer(('0.0.0.0',80),d)
if __name__ == '__main__':
try:
server.start()
except KeyboardInterrupt:
server.stop()
the qwe.py is:
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "Hello World"
@app.route("/xyz")
def ff():
return "Test1"