From 43064c75212b8e5f05e362d8ee9acc58287f930b Mon Sep 17 00:00:00 2001 From: Michael Rasmussen Date: Tue, 28 Nov 2017 21:06:57 +0100 Subject: [PATCH] basic setup Signed-off-by: Michael Rasmussen --- .gitignore | 2 ++ app/__init__.py | 5 +++++ app/views.py | 6 ++++++ run.py | 3 +++ setup.sh | 15 +++++++++++++++ 5 files changed, 31 insertions(+) create mode 100644 .gitignore create mode 100644 app/__init__.py create mode 100644 app/views.py create mode 100755 run.py create mode 100755 setup.sh diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e9bd007 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +flask/ +app/__pycache__/ diff --git a/app/__init__.py b/app/__init__.py new file mode 100644 index 0000000..3ab3eef --- /dev/null +++ b/app/__init__.py @@ -0,0 +1,5 @@ +from flask import Flask + +app = Flask(__name__) +from app import views + diff --git a/app/views.py b/app/views.py new file mode 100644 index 0000000..d467b15 --- /dev/null +++ b/app/views.py @@ -0,0 +1,6 @@ +from app import app + +@app.route('/') +@app.route('/index') +def index(): + return "Hello, World!" diff --git a/run.py b/run.py new file mode 100755 index 0000000..178fd8a --- /dev/null +++ b/run.py @@ -0,0 +1,3 @@ +#!flask/bin/python +from app import app +app.run(debug=True) diff --git a/setup.sh b/setup.sh new file mode 100755 index 0000000..54cbfac --- /dev/null +++ b/setup.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +flask/bin/pip install flask +flask/bin/pip install flask-login +#flask/bin/pip install flask-openid +flask/bin/pip install flask-mail +flask/bin/pip install flask-sqlalchemy +flask/bin/pip install sqlalchemy-migrate +flask/bin/pip install flask-whooshalchemy +flask/bin/pip install flask-wtf +flask/bin/pip install flask-babel +flask/bin/pip install guess_language +flask/bin/pip install flipflop +flask/bin/pip install coverage +flask/bin/pip install psycopg2 + -- 2.39.2