├── Procfile ├── index.py ├── requirements.txt ├── runtime.txt ├── static ├── css │ └── main.css └── js │ └── main.js └── templates ├── about.html ├── home.html └── layout.html /Procfile: -------------------------------------------------------------------------------- 1 | web: gunicorn index:app 2 | -------------------------------------------------------------------------------- /index.py: -------------------------------------------------------------------------------- 1 | from flask import Flask, render_template 2 | 3 | app = Flask(__name__) 4 | 5 | # Creating simple Routes 6 | @app.route('/test') 7 | def test(): 8 | return "Home Page" 9 | 10 | @app.route('/test/about/') 11 | def about_test(): 12 | return "About Page" 13 | 14 | # Routes to Render Something 15 | @app.route('/') 16 | def home(): 17 | return render_template("home.html") 18 | 19 | @app.route('/about', strict_slashes=False) 20 | def about(): 21 | return render_template("about.html") 22 | 23 | # Make sure this we are executing this file 24 | if __name__ == '__main__': 25 | app.run(debug=True) 26 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Click==7.0 2 | Flask==1.0.2 3 | gunicorn==19.9.0 4 | itsdangerous==1.1.0 5 | Jinja2==2.10 6 | MarkupSafe==1.1.0 7 | Werkzeug==0.14.1 8 | -------------------------------------------------------------------------------- /runtime.txt: -------------------------------------------------------------------------------- 1 | python-3.6.7 2 | -------------------------------------------------------------------------------- /static/css/main.css: -------------------------------------------------------------------------------- 1 | body { 2 | background: #000; 3 | } 4 | -------------------------------------------------------------------------------- /static/js/main.js: -------------------------------------------------------------------------------- 1 | console.log('Hello World'); 2 | -------------------------------------------------------------------------------- /templates/about.html: -------------------------------------------------------------------------------- 1 | 2 | {% extends "layout.html" %} 3 | 4 | {% block content %} 5 | 6 |

About

7 | 8 | {% endblock%} 9 | -------------------------------------------------------------------------------- /templates/home.html: -------------------------------------------------------------------------------- 1 | {% extends "layout.html" %} 2 | 3 | {% block content %} 4 | 5 |
6 |

Hello, world!

7 |

This is a simple hero unit, a simple jumbotron-style component for calling extra attention to featured content or information.

8 |
9 |

It uses utility classes for typography and spacing to space content out within the larger container.

10 | Learn more 11 |
12 | 13 | {% endblock%} 14 | -------------------------------------------------------------------------------- /templates/layout.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Flask Web App 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 29 | 30 | 31 |
32 | {% block content %} 33 | {% endblock%} 34 |
35 | 36 | 37 | 38 | 39 | 40 | --------------------------------------------------------------------------------