From c9c288bd6f1c10523e4860ba89f5400e83ba5303 Mon Sep 17 00:00:00 2001 From: Dmitry Zaporozhchenko <34218873+DmitryZap@users.noreply.github.com> Date: Tue, 26 Mar 2019 02:51:04 +0300 Subject: [PATCH] Update started.md --- docs/started.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/started.md b/docs/started.md index aa879e1..9d978e8 100644 --- a/docs/started.md +++ b/docs/started.md @@ -14,17 +14,19 @@ advantage of some new Python features. ```py -from vibora import Vibora, JsonResponse +from vibora import Vibora, Request +from vibora.responses import JsonResponse app = Vibora() @app.route('/') -async def home(): +async def home(request: Request): return JsonResponse({'hello': 'world'}) + if __name__ == '__main__': - app.run(host="0.0.0.0", port=8000) + app.run(debug=True, host='0.0.0.0', port=8000) ``` 3. Run the server: `python3 anything.py`