Created
January 28, 2021 14:32
-
-
Save pulecp/62958568430c3fde171d340db0b0286f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# This is simple HTTP server that times out every request. | |
import datetime | |
import time | |
from flask import Flask, request | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
now = datetime.datetime.now() | |
print(f"{now} - {request.remote_addr}") | |
time.sleep(100000) | |
return 'Hello World!' | |
if __name__ == '__main__': | |
app.run(host='0.0.0.0', port=8080) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment