2017-09-13 14:08:29 +02:00
|
|
|
from sanic import Sanic
|
|
|
|
from sanic import response as res
|
|
|
|
|
2021-12-24 00:30:27 +02:00
|
|
|
|
|
|
|
app = Sanic("Example")
|
2017-09-13 14:08:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
@app.route("/")
|
|
|
|
async def test(req):
|
2021-12-24 00:30:27 +02:00
|
|
|
return res.text("I'm a teapot", status=418)
|
2017-09-13 14:08:29 +02:00
|
|
|
|
|
|
|
|
2021-12-24 00:30:27 +02:00
|
|
|
if __name__ == "__main__":
|
2017-09-13 14:08:29 +02:00
|
|
|
app.run(host="0.0.0.0", port=8000)
|