Like in ExpressJS, app.get("/*") works for all routes.
My code -
from typing import Optional
from fastapi import FastAPI
app = FastAPI()
@app.get('/*')
def user_lost():
return "Sorry You Are Lost !"
I tried it but the webpage result shows {"detail":"Not Found"}
How can I do the same in FastApi?