aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbutoi001 <butoi001@umn.edu>2019-11-21 12:25:32 -0600
committerGitHub Enterprise <noreply-github@umn.edu>2019-11-21 12:25:32 -0600
commit24121a27eb2be6666194b33675e0f9e6e20ecf1a (patch)
tree6f0084c57bd61008e1d616d19de21cef4daea32e
parentWeb stuff semi working (diff)
downloadee4511w-24121a27eb2be6666194b33675e0f9e6e20ecf1a.tar
ee4511w-24121a27eb2be6666194b33675e0f9e6e20ecf1a.tar.gz
ee4511w-24121a27eb2be6666194b33675e0f9e6e20ecf1a.tar.bz2
ee4511w-24121a27eb2be6666194b33675e0f9e6e20ecf1a.tar.lz
ee4511w-24121a27eb2be6666194b33675e0f9e6e20ecf1a.tar.xz
ee4511w-24121a27eb2be6666194b33675e0f9e6e20ecf1a.tar.zst
ee4511w-24121a27eb2be6666194b33675e0f9e6e20ecf1a.zip
Update PI.py
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)