1702881713

Python Web server


## Hello world web ```py from wsgiref.util import setup_testing_defaults from wsgiref.simple_server import make_server import time def hello_world(environ, start_response): setup_testing_defaults(environ) status = "200 ok" headers = [("Content-type", "text/plain")] start_response(status, headers) return "Hello word " + str(time.time()) port = 8080 httpd = make_server("0.0.0.0", port, hello_world) print("Server on port{}...".format(port)) httpd.server_forever() ``` Code to set up a server and print HELLO WORLD on the screen. can someone help me comment more on what this code does? please say something here in the comments or chat to me in this chatroom [https://www.chat-to.dev/chat?q=python-solutions](https://www.chat-to.dev/chat?q=python-solutions). thanks

(0) Comments