Initial Initial Commit
This commit is contained in:
parent
aa029c4c33
commit
ecc9903615
6 changed files with 870 additions and 0 deletions
7
backend/__init__.py
Normal file
7
backend/__init__.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
from .database import db
|
||||
import os
|
||||
|
||||
async def startup():
|
||||
await db.signin({"user": os.getenv('DB_USER'), "pass": os.getenv('DB_PW')})
|
||||
await db.use("test", "test")
|
7
backend/database.py
Normal file
7
backend/database.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
import os
|
||||
from surrealdb import Surreal
|
||||
|
||||
db = Surreal(f"{os.getenv('DB_HOST')}:{os.getenv('DB_PORT')}")
|
||||
|
||||
# TODO: "SQL"-Prompts
|
Loading…
Add table
Add a link
Reference in a new issue