From eadbc2496e72a0e93c9c550607da98d4826cca98 Mon Sep 17 00:00:00 2001 From: Arti Zirk Date: Tue, 1 Nov 2016 23:15:26 +0200 Subject: [PATCH] Add standalone server to rest api server --- api/wsgi.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/api/wsgi.py b/api/wsgi.py index feeb003..cd777d9 100644 --- a/api/wsgi.py +++ b/api/wsgi.py @@ -1 +1,8 @@ from karumedia import application + +if __name__ == "__main__": + from wsgiref.simple_server import make_server + + httpd = make_server('0.0.0.0', 8080, application) + print("Serving on http://0.0.0.0:8080/") + httpd.serve_forever()