A minimal fastapi example loading index.html

Option 1: Static file mounting It was easier than expected. Just needed to put all static files including index.html into static folder in project directory and mount static files. from fastapi import FastAPI from fastapi.staticfiles import StaticFiles app = FastAPI() app.mount(“/static”, StaticFiles(directory=”static”), name=”static”) That’s it. My index.html is now available under http://localhost:8000/static/index.html. In case it … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)