diff --git a/example/app.py b/example/app.py index 77dd28a..390ce1a 100644 --- a/example/app.py +++ b/example/app.py @@ -1,6 +1,7 @@ from example import app from time import sleep +from datetime import datetime @app.route('/process') def process(): @@ -9,3 +10,10 @@ def process(): """ sleep(3) return 'Processing Complete!' + +@app.route('/time') +def time(): + """ + Gets the current time. + """ + return datetime.now().strftime('%d/%m/%y %H:%M') diff --git a/main.py b/main.py index ba56ec1..9e213a4 100755 --- a/main.py +++ b/main.py @@ -3,4 +3,4 @@ from example import app if __name__ == '__main__': - app.run() + app.run(debug=True)