Init basic sanic server
This commit is contained in:
parent
4bf6f5ee1b
commit
94d3ee5d2a
|
@ -0,0 +1,12 @@
|
||||||
|
from sanic import Sanic
|
||||||
|
from sanic.response import json
|
||||||
|
|
||||||
|
app = Sanic()
|
||||||
|
|
||||||
|
@app.route("/")
|
||||||
|
async def test(request):
|
||||||
|
return json({"hello": "world"})
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
app.run(host="0.0.0.0", port="8000")
|
Reference in New Issue