Hey guys, I’m new to this site and i’m trying to upload my proyect from GitHub. Everything seems to be working except for the “Start Command” and it seems I’m a little bit lost here. Whenever I run the website offline on Visual Studio, I go ahead and run the “app.py” using the Flask option. In the Start Command field, I’m putting ./app.py there and is giving me error 127.
I’m fairly new to web-development and any help is welcome. Thanks in advance.
in Visual studio, open the terminal (? i don’t know where) and try to run flask --app app run – I got this from the flask quickstart docs.
if that works, That is the correct way of starting your flask app… use that as your start command, OR:
put it in a bash file, and call that bash file as your start command. this will allow you to change it easier in the future, so you have a single point of entrance where you can set up things before you run your app.
for instance, you could have start.sh file like this:
#!/usr/bin/env bash
set -o errexit
flask --app app run
(In linux, i would also have to set the “execute” permission: chmod +x start.sh )