socketify.py/examples/automatic_port_selection.py

9 wiersze
229 B
Python
Czysty Zwykły widok Historia

2022-05-31 21:51:39 +00:00
from socketify import App
app = App()
app.get("/", lambda res, req: res.end("Hello World socketify from Python!"))
2022-11-16 19:28:46 +00:00
app.listen(
0, lambda config: print("Listening on port http://localhost:%d now\n" % config.port)
)
app.run()