summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSacheendra Talluri <sacheendra.t@gmail.com>2017-01-25 15:07:53 +0100
committerSacheendra Talluri <sacheendra.t@gmail.com>2017-01-25 15:07:53 +0100
commitee0379056a25862102a5068bc579889ed963f4e7 (patch)
treec3af12a67d6e2a2dda33a01381ad0707f8f1bb6f
parent8a8279ec685311ceffd2aadb1dc7c76e8637f043 (diff)
gets static files from new directory structure
-rw-r--r--main.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.py b/main.py
index 67ff72ac..bd2a3111 100644
--- a/main.py
+++ b/main.py
@@ -16,7 +16,7 @@ from opendc.util import exceptions, rest
with open('/var/www/opendc.ewi.tudelft.nl/web-server/config/keys.json') as file:
KEYS = json.load(file)
-STATIC_ROOT = os.path.join(KEYS['ROOT_DIR'], 'static', 'build')
+STATIC_ROOT = os.path.join(KEYS['ROOT_DIR'], 'opendc-frontend', 'build')
FLASK_CORE_APP = Flask(__name__, static_url_path='')
FLASK_CORE_APP.config['SECREY_KEY'] = KEYS['FLASK_SECRET']
@@ -55,7 +55,7 @@ def serve_projects():
def serve_web_server_test():
"""Serve the web server test."""
- return send_from_directory(os.path.join(KEYS['ROOT_DIR'], 'web-server', 'static'), 'index.html')
+ return send_from_directory(os.path.join(KEYS['ROOT_DIR'], 'opendc-web-server', 'static'), 'index.html')
@FLASK_CORE_APP.route('/<path:folder>/<path:filepath>')
def serve_static(folder, filepath):
@@ -64,7 +64,7 @@ def serve_static(folder, filepath):
if not folder in ['bower_components', 'img', 'scripts', 'styles']:
abort(404)
- return send_from_directory(os.path.join(KEYS['ROOT_DIR'], 'static', 'build', folder), filepath)
+ return send_from_directory(os.path.join(STATIC_ROOT, folder), filepath)
@FLASK_CORE_APP.route('/tokensignin', methods=['POST'])
def sign_in():