Files
vercel/packages/python/test/fixtures/00-request-path/api/asgi.py
Steven bae2a2e4df [python] Upgrade tests (#7711)
* [python] Upgrade tests

* Fix latest sanic asgi

* Bump flask

* Change requirements.txt to Pipfile

* Fix dev test

* Use verbose requirements.txt

* Flip requirements
2022-04-25 12:01:49 -04:00

18 lines
423 B
Python

from sanic import Sanic
from sanic.response import json
app = Sanic(name='test')
@app.route('/')
@app.route('/<path:path>')
async def index(request, path=""):
return json({
"parsed": True,
"url": request.url,
"query_string": request.query_string,
"args": request.args,
"query_args": request.query_args,
})
if __name__ == '__main__':
app.run(host="0.0.0.0", port=8003)