socketify.py/examples/hello_world.py

10 wiersze
215 B
Python

from socketify import App
app = App()
app.get("/", lambda res, req: res.end("Hello World!"))
app.listen(
3000,
lambda config: print("Listening on port http://localhost:%d now\n" % config.port),
)
app.run()