mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-10 04:22:12 +00:00
* [python] Upgrade tests * Fix latest sanic asgi * Bump flask * Change requirements.txt to Pipfile * Fix dev test * Use verbose requirements.txt * Flip requirements
18 lines
423 B
Python
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)
|