Skip to content

Commit

Permalink
Added more endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Hanif committed Nov 7, 2019
1 parent 52a87c6 commit 739a042
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions src/server.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
from flask import Flask

app = Flask(__name__)

app = Flask(__name__)

@app.route('/upload', methods=['GET', 'POST'])
def upload():
if flask.request.method == 'POST':
return 'Submitted experiment.'

return '''<form method="POST">
Data: <input type="text" name="data"><br>
<input type="submit" value="Submit"><br>
</form>'''

@app.route('/compare/<path:experiment_one>/<path:experiment_two>')
def compare():
return 'This is the compare function for two experiments.'

@app.route('/experiment')
def experiment():
return 'This is the view of an experiment'

@app.route('/hello')
def hello():
return Hello!
return 'Hello!'

if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')

0 comments on commit 739a042

Please sign in to comment.