Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 538 Bytes

getting_started.md

File metadata and controls

25 lines (19 loc) · 538 Bytes

Getting Started

Make sure you have pip and python 3.5 before starting

Benchmarks

  • Install Sanic
  • python3 -m pip install sanic
  • Edit main.py to include:
from sanic import Sanic
from sanic.response import json

app = Sanic(__name__)

@app.route("/")
async def test(request):
    return json({ "hello": "world" })

app.run(host="0.0.0.0", port=8000, debug=True)
  • Run python3 main.py

You now have a working Sanic server! To continue on, check out: