Skip to content

Instantly share code, notes, and snippets.

@tedsuo
Created November 24, 2020 17:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tedsuo/1c5c62f4bc21301804f31cab9f142971 to your computer and use it in GitHub Desktop.
Save tedsuo/1c5c62f4bc21301804f31cab9f142971 to your computer and use it in GitHub Desktop.
python basic server
#!/usr/bin/env python3
from flask import Flask
from time import sleep
PORT = 8000
app = Flask(__name__)
@app.route("/hello")
def hello():
sleep(30 / 1000)
return "hello world\n"
if __name__ == "__main__":
app.run(host="0.0.0.0", port=PORT)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment