From 24121a27eb2be6666194b33675e0f9e6e20ecf1a Mon Sep 17 00:00:00 2001 From: butoi001 Date: Thu, 21 Nov 2019 12:25:32 -0600 Subject: Update PI.py --- Web/PI/PI.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'Web/PI/PI.py') 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) -- cgit v1.2.3