Answer the question
In order to leave comments, you need to log in
What is the minimum number of files in the project and with what content to deploy the script on Heroku?
There is a script
import sys
print (sys.version[::-1])
Answer the question
In order to leave comments, you need to log in
One python script and one Procfile is enough, which contains the command to run the script. The script must, at a minimum, open a socket serving connections. And you will see the result if it is written to the socket.
Using Flask, for example:
import os
import sys
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return sys.version[::-1]
if __name__ == "__main__":
port = int(os.environ.get('PORT', 5000))
app.run(host='0.0.0.0', port=port)
web: python app.py
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question