examples/geo-distributed-database-vercel/README.md
Note: This is the Vercel-optimized version of the geo-distributed-database example. It uses the
hono/verceladapter and is configured for Vercel deployment.
Store user session state in edge-local Rivet Actors so preferences and activity stay close to users.
git clone https://github.com/rivet-dev/rivet.git
cd rivet/examples/geo-distributed-database
npm install
npm run dev
createInRegion and createState input.The UserSession actor initializes state with a region input and stores session data in persistent state.
See the implementation in src/actors.ts.
The frontend connects with createInRegion and displays session locality from the actor state.
See the client UI in frontend/App.tsx and the server wiring in src/server.ts.
Read more about state, actions, and actor inputs.
MIT