I've been on and off, coding away at CS50 projects for some years now and I was really excited seeing the course moving away from PHP and into the elegant Python. Now, I want to recreate C$50 Finance in Python, a project I've already made in PHP, but I have a problem with running flask. At first, the command
$ flask run gave me the error
error: Could not locate Flask application. You did not provide the FLASK_APP environment variable.
Some research online led me to Flask's site 'http://flask.pocoo.org/docs/0.12/quickstart/', where it tells me an example of a minimal Flask app, but all this code (including more) is already in
application.py. As recommended there, I used
export FLASK_APP=application.py, now using
flask run seems to do the trick. I get the following message:
* Serving Flask app "application" * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Using, as per pset7's directions, CS50IDE -> Web server, I arrive at my website, where it, sadly, tells me that
No application seems to be running here!
Does anyone have any idea what's going wrong here?
Thanks in advance!