I'm trying to run a simple hello world python program on my heroku server. I'm new to heroku.I was able to successfully deploy my script to heroku. My python script and procfile are given below,
hi.py
print("hello world")
Procfile
web: python hi.py
I got "Hello world" as output when i ran heroku run web
on my terminal.But when i try to run the app using heroku web url it shows the following error.
Application Error An error occurred in the application and your page could not be served. Please try again in a few moments.
What did i do wrong here? I'm newbie to heroku & its concepts, please do bare.
I disagree and state you want flask
main_app.py
import flask
app = flask.Flask(__name__)
@app.route("/")
def index():
#do whatevr here...
return "Hello Heruko"
then change your procfile to web: gunicorn main_app:app --log-file -
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With