geo-access
This commit is contained in:
parent
686e395fcd
commit
8a87a78449
6 changed files with 117 additions and 6 deletions
|
@ -1,7 +1,12 @@
|
|||
from dotenv import load_dotenv
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from endpoints.geo_access import geo_access_router
|
||||
from routes import router
|
||||
|
||||
load_dotenv()
|
||||
|
||||
app = FastAPI(title="Simple Fullstack API")
|
||||
|
||||
# CORS per permettere richieste dal frontend
|
||||
|
@ -15,8 +20,16 @@ app.add_middleware(
|
|||
|
||||
# Includi le route
|
||||
app.include_router(router)
|
||||
app.include_router(geo_access_router)
|
||||
|
||||
|
||||
@app.post("/auth")
|
||||
def auth():
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import uvicorn
|
||||
|
||||
print("🚀 Avvio server FastAPI...")
|
||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||
uvicorn.run(app, host="0.0.0.0", port=8000)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue