Bad ChatGPT

This commit is contained in:
Joseph Ferano 2023-05-19 19:30:30 +07:00
parent f3a858956e
commit 88582d9ff3

5
api.py
View File

@ -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}") 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("/") @app.get("/")
async def root(): async def root():
return FileResponse('static/index.html') return FileResponse('static/index.html')