geo-access
This commit is contained in:
parent
686e395fcd
commit
8a87a78449
6 changed files with 117 additions and 6 deletions
|
@ -1,3 +1,5 @@
|
|||
import os
|
||||
|
||||
from fastapi import APIRouter, HTTPException
|
||||
from pymongo import MongoClient
|
||||
from datetime import datetime
|
||||
|
@ -6,7 +8,10 @@ from datetime import datetime
|
|||
router = APIRouter()
|
||||
|
||||
# Connessione MongoDB
|
||||
client = MongoClient("mongodb://localhost:27017/")
|
||||
username = os.getenv("ME_CONFIG_MONGODB_ADMIN_USERNAME")
|
||||
password = os.getenv("ME_CONFIG_MONGODB_ADMIN_PASSWORD")
|
||||
|
||||
client = MongoClient(f"mongodb://admin:password@localhost:27017/")
|
||||
db = client["simple_db"]
|
||||
collection = db["items"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue