Open srang992 opened 1 year ago
I don't think it's currently possible to run Flet on lambda-like backends as they are 1) stateless and 2) don't support WebSockets. However, in the future we might add another "lambda" backend that works like send request from the browser -> dehydrate page state in lambda -> process event -> send page update delta -> hydrate state.
Python runtime for reference: https://vercel.com/docs/functions/serverless-functions/runtimes/python
Alternatively, you can publish entire Flet app as a static website and use Vercel edge functions as a backend.
Recently I tried flet-fastapi and created a sample app. It works fine locally, but when I deploy it on Vercel as a serverless function, it gives me an error. below are the files I am using for deployment.
directory structure
api/index.py
requirements.txt
vercel.json
the error