Skip to content
Snippets Groups Projects
hello_world.py 330 B
Newer Older
Robert Bechara's avatar
Robert Bechara committed
from flask import Flask
import datetime
app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, World!'
@app.route('/time')
def show_time():
    DateTime = str(datetime.datetime.now())
    return 'The current time is: %s' % DateTime
if __name__ == '__main__':
    app.run(debug=True,host='0.0.0.0',port=8000)