From 8957e4ec25fb2b6b1b20e36a78f5576b6a7736f1 Mon Sep 17 00:00:00 2001 From: Sam Agnew Date: Tue, 13 Dec 2016 12:35:46 -0500 Subject: [PATCH] Fix PEP8 in Hello World example --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ece97d8..669ed8d9 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,17 @@ All tests were run on an AWS medium instance running ubuntu, using 1 process. E from sanic import Sanic from sanic.response import json + app = Sanic() + @app.route("/") async def test(request): return json({"hello": "world"}) -app.run(host="0.0.0.0", port=8000) +if __name__ == '__main__': + app.run(host="0.0.0.0", port=8000) + ``` ## Installation