mirror of
https://github.com/CragglesG/url-shortener.git
synced 2024-11-22 04:53: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
6
main.py
6
main.py
|
@ -36,4 +36,8 @@ async def slug_only(slug: str):
|
||||||
if slug == "favicon.ico":
|
if slug == "favicon.ico":
|
||||||
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