Filaments can now be created
This commit is contained in:
@@ -1,13 +1,21 @@
|
||||
"""Main entrypoint to the server."""
|
||||
|
||||
|
||||
import uvicorn
|
||||
from fastapi import FastAPI
|
||||
|
||||
import spoolson.api.v1.router
|
||||
from spoolson.api.v1.router import app as v1_app
|
||||
from spoolson.database.database import setup_db
|
||||
|
||||
app = FastAPI()
|
||||
app = FastAPI(debug=True)
|
||||
app.mount("/api/v1", v1_app)
|
||||
|
||||
|
||||
@app.on_event("startup")
|
||||
async def startup() -> None:
|
||||
"""Run the service's startup sequence."""
|
||||
await setup_db("sqlite+aiosqlite:///./sql_app.db")
|
||||
|
||||
app.mount("/api/v1", spoolson.api.v1.router.app)
|
||||
|
||||
if __name__ == "__main__":
|
||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||
|
||||
Reference in New Issue
Block a user