Spaces:
Running
on
Zero
Running
on
Zero
File size: 385 Bytes
565ab19 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
from fastapi import FastAPI
from app.main import app
from app.models import Base
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
engine = create_engine('sqlite:///database.db')
Base.metadata.create_all(engine)
Session = sessionmaker(bind=engine)
db = Session()
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000) |