From e43fe25b1780702221673e780cc3d564c02cb380 Mon Sep 17 00:00:00 2001 From: Tobias Kurze Date: Tue, 26 Mar 2019 11:58:40 +0100 Subject: [PATCH] added app.wsgi (wsgi support) and README.md --- README.md | 23 +++++++++++++++++++++++ app.wsgi | 14 ++++++++++++++ backend | 2 +- 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 README.md create mode 100644 app.wsgi diff --git a/README.md b/README.md new file mode 100644 index 0000000..476f5f6 --- /dev/null +++ b/README.md @@ -0,0 +1,23 @@ + +# Vue-Flask wsgi boilerplate template + + + +## Example Virtual Host Config for WSGI + +```xml + + ServerName vue-test + ServerAlias vue-test.local + ServerAdmin kurze@kit.edu + ErrorLog "/var/log/httpd/vue-test.local-error_log" + CustomLog "/var/log/httpd/vue-test.local-access_log" common + + DocumentRoot /srv/http/vue_test/ + WSGIScriptAlias / /srv/http/vue_test/app.wsgi + + Allow from all + + +``` + diff --git a/app.wsgi b/app.wsgi new file mode 100644 index 0000000..5a2d9e3 --- /dev/null +++ b/app.wsgi @@ -0,0 +1,14 @@ +#!/usr/bin/python + +activate_this = '/srv/http/vue_test/venv/bin/activate_this.py' +with open(activate_this) as file_: + exec(file_.read(), dict(__file__=activate_this)) + +import sys +import logging + +logging.basicConfig(stream=sys.stderr) +sys.path.insert(0, "/srv/http/vue_test/") + +from backend import app as application +application.secret_key = 'Add your secret key' diff --git a/backend b/backend index ebc34e3..bc50e23 160000 --- a/backend +++ b/backend @@ -1 +1 @@ -Subproject commit ebc34e396d0db35a732a47cbfa5110a82b184fe4 +Subproject commit bc50e23a224619c1a0620e3badd014ff8bff152a