Bad ChatGPT
This commit is contained in:
parent
f3a858956e
commit
88582d9ff3
5
api.py
5
api.py
@ -19,11 +19,6 @@ app.mount("/static", StaticFiles(directory="static", html=True), name="static")
|
||||
|
||||
couch = couchdb.Server(f"http://{COUCHDB_USER}:{COUCHDB_PASSWORD}@{COUCHDB_HOST}:{COUCHDB_PORT}")
|
||||
|
||||
@app.on_event("startup")
|
||||
async def startup_event():
|
||||
if 'urls' not in couch:
|
||||
couch.create_database('urls')
|
||||
|
||||
@app.get("/")
|
||||
async def root():
|
||||
return FileResponse('static/index.html')
|
||||
|
Loading…
x
Reference in New Issue
Block a user