Persisting state in the browser #662
-
When running a stateful web app (incrementing counter) I noticed that if my server hot-reloads I lose all state in my browser. Is it possible to shift some of the state to the frontend to allow for load balanced servers where you can't always be on the same server each request? Or does idom rely on the web sockets for state transfer even in production mode? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
In order for anything to be persistent, you'll need some sort of persistent storage, such as a database. If your web framework of choice (FastAPI, Flask, etc) does not have integrated database capabilities, you might want to pip install an ORM such as SQLAlchemy. |
Beta Was this translation helpful? Give feedback.
In order for anything to be persistent, you'll need some sort of persistent storage, such as a database.
If your web framework of choice (FastAPI, Flask, etc) does not have integrated database capabilities, you might want to pip install an ORM such as SQLAlchemy.