I’m trying to run Flask with FastCGI. (The wiki indicates that Passenger would want to take over my whole domain, and I cannot do that.) I can verify that FastCGI is working for my domain, using a Flup-based application:
The equivalent for Flask, however, does not work. Here is the source I’m using.
from flask import Flask app = Flask(__name__) @app.route('/reg/hello.fcgi') def hello_world(): print( 'hello_world called' ) return 'Yet Another Hello World!' if __name__ == '__main__': hello_world()
Launching it from the command line works fine. I really don’t understand how the Flask routing interacts with the FastCGI configuration. How can the app.route call have any effect, when FastCGI has already dispatched to this script? Can anyone enlighten me? Does the routing assume that all requests are directed to this app, via .htaccess?