From 4062be7bac546e71db27b5580a368f0048de4155 Mon Sep 17 00:00:00 2001 From: Xevion Date: Fri, 19 Jun 2020 14:03:41 -0500 Subject: [PATCH] basic Flask application setup, requirements.txt + .flaskenv, essentially read for development --- .flaskenv | 2 ++ config.py | 0 main.py | 5 ----- requirements.txt | 1 + trivia/__init__.py | 10 ++++++++++ trivia/api.py | 5 +++++ trivia/routes.py | 3 ++- wsgi.py | 10 ++++++++++ 8 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 .flaskenv create mode 100644 config.py delete mode 100644 main.py create mode 100644 requirements.txt create mode 100644 trivia/__init__.py create mode 100644 trivia/api.py create mode 100644 wsgi.py diff --git a/.flaskenv b/.flaskenv new file mode 100644 index 0000000..d80687f --- /dev/null +++ b/.flaskenv @@ -0,0 +1,2 @@ +FLASK_APP=wsgi.py +FLASK_ENV=development \ No newline at end of file diff --git a/config.py b/config.py new file mode 100644 index 0000000..e69de29 diff --git a/main.py b/main.py deleted file mode 100644 index 5fb7cdc..0000000 --- a/main.py +++ /dev/null @@ -1,5 +0,0 @@ -""" -main.py - -Simple launcher file for project. -""" \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..af62424 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +Flask~=1.1.2 \ No newline at end of file diff --git a/trivia/__init__.py b/trivia/__init__.py new file mode 100644 index 0000000..0958d9e --- /dev/null +++ b/trivia/__init__.py @@ -0,0 +1,10 @@ +""" +__init__.py +""" + +from flask import Flask + +# initialize Flask object +app = Flask(__name__) + +from trivia import routes, api diff --git a/trivia/api.py b/trivia/api.py new file mode 100644 index 0000000..d598da0 --- /dev/null +++ b/trivia/api.py @@ -0,0 +1,5 @@ +""" +api.py + +Handles backend routes assisting +""" \ No newline at end of file diff --git a/trivia/routes.py b/trivia/routes.py index feca3f4..397eb4f 100644 --- a/trivia/routes.py +++ b/trivia/routes.py @@ -1,4 +1,5 @@ """ -Handles +routes.py +Handles user frontend routes. """ \ No newline at end of file diff --git a/wsgi.py b/wsgi.py new file mode 100644 index 0000000..7c49a26 --- /dev/null +++ b/wsgi.py @@ -0,0 +1,10 @@ +""" +wsgi.py + +Simple launcher file for project. +""" + +from trivia import app + +if __name__ == "__main__": + app.run(host="0.0.0.0")