aboutsummaryrefslogtreecommitdiffstats
path: root/Web/PI
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--Web/PI/PI.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Web/PI/PI.py b/Web/PI/PI.py
index ae01bf3..5e75298 100644
--- a/Web/PI/PI.py
+++ b/Web/PI/PI.py
@@ -8,6 +8,10 @@ UPLOAD_DESTINATION = "Uploads/upload.py"
RESULTS_DESTINATION = "Results/results.txt"
+@app.route('/')
+def home():
+ return "ANDI'S PIE"
+
@app.route('/tests/endpoint', methods=['POST'])
def my_test_endpoint():
# Receive post
@@ -20,7 +24,7 @@ def my_test_endpoint():
upload.close()
# Run python script
- subprocess.call(["python", UPLOAD_DESTINATION], shell=True)
+ subprocess.call(["python", UPLOAD_DESTINATION])
# Get results file
with open(RESULTS_DESTINATION, 'r') as results:
@@ -36,4 +40,4 @@ def my_test_endpoint():
return jsonify(dictToReturn)
if __name__ == '__main__':
- app.run(host="localhost", port=8000) \ No newline at end of file
+ app.run(host="localhost", port=8000)