kopia lustrzana https://github.com/cirospaciari/socketify.py
9 wiersze
297 B
Python
9 wiersze
297 B
Python
from socketify import WSGI
|
|
|
|
def app(environ, start_response):
|
|
start_response('200 OK', [('Content-Type', 'text/plain')])
|
|
yield b'Hello, World!\n'
|
|
|
|
if __name__ == "__main__":
|
|
WSGI(app).listen(8000, lambda config: print(f"Listening on port http://localhost:{config.port} now\n")).run(8)
|