Skip to content

Instantly share code, notes, and snippets.

@pulecp
Created January 28, 2021 14:32
Show Gist options
  • Save pulecp/62958568430c3fde171d340db0b0286f to your computer and use it in GitHub Desktop.
Save pulecp/62958568430c3fde171d340db0b0286f to your computer and use it in GitHub Desktop.
#!/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