Nuevos cambios en el servidor
This commit is contained in:
19
backend/test_db_connection.py
Normal file
19
backend/test_db_connection.py
Normal file
@@ -0,0 +1,19 @@
|
||||
import asyncio
|
||||
import asyncpg
|
||||
|
||||
async def test_connection():
|
||||
try:
|
||||
conn = await asyncpg.connect(
|
||||
user="servicemanager",
|
||||
password="servicemanager123",
|
||||
database="servicemanager",
|
||||
host="postgres",
|
||||
port=5432
|
||||
)
|
||||
print("Connection successful!")
|
||||
await conn.close()
|
||||
except Exception as e:
|
||||
print(f"Connection failed: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
asyncio.run(test_connection())
|
||||
Reference in New Issue
Block a user