|
|
@ -8,20 +8,20 @@ def welcome(): |
|
|
|
# return a json |
|
|
|
return jsonify({'status': 'api working'}) |
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
#define the localhost ip and the port that is going to be used |
|
|
|
# in some future article, we are going to use an env variable instead a hardcoded port |
|
|
|
app.run(host='0.0.0.0', port=os.getenv('PORT')) |
|
|
|
|
|
|
|
@app.route('/hello') |
|
|
|
def hello(): |
|
|
|
return 'Hello, World' |
|
|
|
|
|
|
|
|
|
|
|
@app.route('/liste_orgas_paheko') |
|
|
|
def get_list_orgas_paheko(): |
|
|
|
return jsonify( |
|
|
|
{'nom court': 'toto'}, |
|
|
|
{'nom court': 'titi'} |
|
|
|
) |
|
|
|
|
|
|
|
/*************************************************/ |
|
|
|
|
|
|
|
if __name__ == '__main__': |
|
|
|
#define the localhost ip and the port that is going to be used |
|
|
|
# in some future article, we are going to use an env variable instead a hardcoded port |
|
|
|
app.run(host='0.0.0.0', port=os.getenv('PORT')) |
|
|
|