2021-12-24 00:30:27 +02:00
|
|
|
from sanic import Sanic, response
|
2016-10-09 15:28:31 -07:00
|
|
|
|
2021-12-24 00:30:27 +02:00
|
|
|
|
|
|
|
app = Sanic("Example")
|
2016-10-09 15:28:31 -07:00
|
|
|
|
2016-10-14 19:53:49 -07:00
|
|
|
|
2016-10-09 15:28:31 -07:00
|
|
|
@app.route("/")
|
|
|
|
async def test(request):
|
2017-04-11 20:34:55 +00:00
|
|
|
return response.json({"test": True})
|
2016-10-14 19:53:49 -07:00
|
|
|
|
2016-10-09 15:28:31 -07:00
|
|
|
|
2021-12-24 00:30:27 +02:00
|
|
|
if __name__ == "__main__":
|
2017-03-12 22:42:34 +08:00
|
|
|
app.run(host="0.0.0.0", port=8000)
|