From 1b598b493901c1064f8491a172d83fb288de0559 Mon Sep 17 00:00:00 2001 From: Manuel Holtgrewe Date: Mon, 6 Apr 2020 10:57:47 +0200 Subject: [PATCH] Update flask_app.py --- the_module/beacon/flask_app.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/the_module/beacon/flask_app.py b/the_module/beacon/flask_app.py index 62ba566..2b46466 100644 --- a/the_module/beacon/flask_app.py +++ b/the_module/beacon/flask_app.py @@ -2,10 +2,18 @@ #import database #import user_cli #import rest_api +import sys from flask import Flask, render_template, url_for, request, jsonify app = Flask(__name__) +# Windows: +# # set PATH_DATABASE=XXX.sqlite3 +# # python beacon/flask_app.py +# Mac/Linux +# # PATH_DABASE=XXX.sqlite3 python beacon/flask_app.py +db_connection = DatabaseConnection(path=sys.environ.get("PATH_DABASE")) + @app.route("/") def home(): """