aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Procfile1
-rw-r--r--README.md2
-rw-r--r--__pycache__/app.cpython-38.pycbin0 -> 231 bytes
-rw-r--r--app/__pycache__/main.cpython-38.pycbin0 -> 1437 bytes
-rw-r--r--app/main.py (renamed from app.py)14
-rw-r--r--wsgi.py4
6 files changed, 7 insertions, 14 deletions
diff --git a/Procfile b/Procfile
new file mode 100644
index 0000000..fc272ab
--- /dev/null
+++ b/Procfile
@@ -0,0 +1 @@
+web: gunicorn wsgi:app \ No newline at end of file
diff --git a/README.md b/README.md
index 98106e2..7624c62 100644
--- a/README.md
+++ b/README.md
@@ -124,7 +124,7 @@ pip install -r requirements.txt
Run the Project:
```
-python app.py
+python wsgi.py
```
## Project Structure
diff --git a/__pycache__/app.cpython-38.pyc b/__pycache__/app.cpython-38.pyc
new file mode 100644
index 0000000..0899514
--- /dev/null
+++ b/__pycache__/app.cpython-38.pyc
Binary files differ
diff --git a/app/__pycache__/main.cpython-38.pyc b/app/__pycache__/main.cpython-38.pyc
new file mode 100644
index 0000000..478e41c
--- /dev/null
+++ b/app/__pycache__/main.cpython-38.pyc
Binary files differ
diff --git a/app.py b/app/main.py
index 5c97d70..c2308f9 100644
--- a/app.py
+++ b/app/main.py
@@ -9,9 +9,7 @@ app = Flask(__name__)
def execute_sql_statement(sql_statement, conn):
cur = conn.cursor()
cur.execute(sql_statement)
-
rows = cur.fetchall()
-
return rows
def get_list_of_dict(keys, list_of_tuples):
@@ -31,14 +29,4 @@ def index():
cities_list = get_cities_list()
keys = ("city", "latitude", "longitude")
cities_list = get_list_of_dict(keys, cities_list)
- # start_coords = (42.9974521, -78.7907883)
- # folium_map = folium.Map(location=start_coords, zoom_start=14)
- # _ = folium_map._repr_html_()
- # map_div = Markup(folium_map.get_root().html.render())
- # hdr_txt = Markup(folium_map.get_root().header.render())
- # script_txt = Markup(folium_map.get_root().script.render())
- return render_template("index.html", cities_list=cities_list)
-
-
-if __name__ == '__main__':
- app.run(debug=True)
+ return render_template("index.html", cities_list=cities_list) \ No newline at end of file
diff --git a/wsgi.py b/wsgi.py
new file mode 100644
index 0000000..2e6a19f
--- /dev/null
+++ b/wsgi.py
@@ -0,0 +1,4 @@
+from app.main import app
+
+if __name__ == '__main__':
+ app.run(debug=True)