-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.py
31 lines (23 loc) · 772 Bytes
/
app.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import os
from flask import Flask, request
# Create a new Flask app
app = Flask(__name__)
# == Your Routes Here ==
# == Example Code Below ==
# GET /emoji
# Returns a emojiy face
# Try it:
# ; curl http://localhost:5000/emoji
@app.route('/emoji', methods=['GET'])
def get_emoji():
return ":)"
# This imports some more example routes for you to see how they work
# You can delete these lines if you don't need them.
from example_routes import apply_example_routes
apply_example_routes(app)
# == End Example Code ==
# These lines start the server if you run this file directly
# They also start the server configured to use the test database
# if started in test mode.
if __name__ == '__main__':
app.run(debug=True, port=int(os.environ.get('PORT', 5000)))