Skip to content
Snippets Groups Projects
Commit 4f7772b1 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

redirect to docs from index page

parent 7b400dc7
Branches
Tags
No related merge requests found
......@@ -2,6 +2,7 @@ import json
import uvicorn
from fastapi import FastAPI
from starlette.responses import RedirectResponse
from logic import Constants
from logic.databaseNew import Models
......@@ -24,5 +25,10 @@ app = FastAPI(title=Constants.APP_NAME,
description='The StorageLeaf API')
app.include_router(DeviceRouter.router)
@app.get("/")
async def root():
return RedirectResponse(url='/docs')
if __name__ == '__main__':
uvicorn.run(app, host=settings['server']['listen'], port=settings['server']['port'])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment