All checks were successful
Build and Push to Private Registry101 / build (push) Successful in 10s
28 lines
672 B
Python
28 lines
672 B
Python
#!/bin/env python3
|
|
from fastapi import FastAPI, Depends
|
|
import uvicorn
|
|
from sqlalchemy import create_engine, Column, Integer,String, ForeignKey
|
|
from sqlalchemy.engine import URL
|
|
from sqlalchemy.orm import sessionmaker, Session, declarative_base
|
|
import db
|
|
import users
|
|
import posts
|
|
|
|
|
|
|
|
db.Base.metadata.create_all(bind=db.engine)
|
|
app = FastAPI()
|
|
app.include_router(users.router)
|
|
app.include_router(posts.router)
|
|
|
|
@app.get("/")
|
|
async def root():
|
|
return {"message": "Hello World"}
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
uvicorn.run("papi:app", host="0.0.0.0", port=8912, reload=True, log_level="debug",
|
|
workers=5, limit_concurrency=10, limit_max_requests=100)
|
|
|