Add basic Flask and related files

This commit is contained in:
Hippo 2019-08-16 18:50:05 +05:30
parent 05c1ac40d4
commit b5edaa82d4
4 changed files with 21 additions and 0 deletions

1
Procfile Normal file
View File

@ -0,0 +1 @@
web: gunicorn app:app --log-file=-

17
app.py Normal file
View File

@ -0,0 +1,17 @@
from flask import Flask
from datetime import datetime
app = Flask(__name__)
@app.route('/')
def homepage():
the_time = datetime.now().strftime("%A, %d %b %Y %l:%M %p")
return """
<h1>Hello heroku</h1>
<p>It is currently {time}.</p>
<img src="http://loremflickr.com/600/400">
""".format(time=the_time)
if __name__ == '__main__':
app.run(debug=True, use_reloader=True)

2
requirements.txt Normal file
View File

@ -0,0 +1,2 @@
Flask
gunicorn

1
runtime.txt Normal file
View File

@ -0,0 +1 @@
python-3.6.8