Created
November 24, 2020 17:42
-
-
Save tedsuo/1c5c62f4bc21301804f31cab9f142971 to your computer and use it in GitHub Desktop.
python basic server
This file contains 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 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