Archived
1
Fork 0

Init basic sanic server

This commit is contained in:
Jake Howard 2017-04-11 08:56:47 +01:00
parent 4bf6f5ee1b
commit 94d3ee5d2a
2 changed files with 13 additions and 0 deletions

View file

@ -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")

View file

@ -5,6 +5,7 @@ setup(
name="lantern", name="lantern",
version="1.0", version="1.0",
install_requires=[ install_requires=[
"sanic==0.4.1"
], ],
entry_points=""" entry_points="""
[console_scripts] [console_scripts]