mirror of
https://github.com/CragglesG/url-shortener.git
synced 2024-11-25 14:33:40 +00:00
Added run if main
This commit is contained in:
parent
acc583b24e
commit
2feead3941
1 changed files with 5 additions and 1 deletions
4
main.py
4
main.py
|
@ -37,3 +37,7 @@ async def slug_only(slug: str):
|
||||||
return HTTPException(404)
|
return HTTPException(404)
|
||||||
else:
|
else:
|
||||||
return RedirectResponse(urls["public"][slug])
|
return RedirectResponse(urls["public"][slug])
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
import uvicorn
|
||||||
|
uvicorn.run(app)
|
Loading…
Reference in a new issue