2020-05-03 19:20:52 +00:00
|
|
|
import uvicorn
|
|
|
|
from fastapi import FastAPI
|
2020-04-28 11:03:25 +00:00
|
|
|
|
2020-05-03 19:20:52 +00:00
|
|
|
import bifrost.routers as routers
|
|
|
|
from .config import Settings as settings
|
2020-04-28 11:03:25 +00:00
|
|
|
|
2020-05-03 19:20:52 +00:00
|
|
|
app = FastAPI()
|
2020-04-28 11:03:25 +00:00
|
|
|
|
|
|
|
|
2020-05-03 19:20:52 +00:00
|
|
|
@app.get("/")
|
|
|
|
async def root():
|
|
|
|
return {"message": "Hello World"}
|
2020-04-28 11:03:25 +00:00
|
|
|
|
2020-05-03 20:27:40 +00:00
|
|
|
|
2020-05-03 19:20:52 +00:00
|
|
|
app.include_router(routers.router)
|
2020-04-28 11:03:25 +00:00
|
|
|
|
|
|
|
|
2020-05-03 19:20:52 +00:00
|
|
|
def init():
|
|
|
|
uvicorn.run(app, host=settings.host, port=settings.port)
|