summaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorleonoverweel <l.overweel@gmail.com>2017-04-01 16:14:03 +0200
committerleonoverweel <l.overweel@gmail.com>2017-04-01 16:14:03 +0200
commit26b34801ca54cbeca78c6807a14ed7822ebe9c3f (patch)
treec2ef62f4ffa825ba2b8686a77fdd7fef4eece786 /main.py
parent59b05ac8425e34cdf41179506cdda357c59b4b12 (diff)
Add /api path to Flask app
Diffstat (limited to 'main.py')
-rw-r--r--main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.py b/main.py
index 56f8e7c1..600aea92 100644
--- a/main.py
+++ b/main.py
@@ -102,6 +102,12 @@ def sign_in():
return jsonify(**data)
+@FLASK_CORE_APP.route('/api/<path:endpoint_path>')
+def api_call(endpoint_path):
+ """Call an API endpoint directly over HTTP"""
+
+ return endpoint_path
+
@SOCKET_IO_CORE.on('request')
def receive_message(message):
""""Receive a SocketIO request"""
@@ -149,4 +155,3 @@ def receive_message(message):
SOCKET_IO_CORE.run(FLASK_CORE_APP, host='0.0.0.0', port=8081)
-