# Example with connection state recovery This example shows how to use the [Connection state recovery feature](https://socket.io/docs/v4/connection-state-recovery). ![Video of the example](assets/csr.gif) ## How to use ```shell # choose your module syntax (either ES modules or CommonJS) $ cd esm/ # install the dependencies $ npm i # start the server $ node index.js ``` And point your browser to `http://localhost:3000`. You can also run this example directly in your browser on: - [CodeSandbox](https://codesandbox.io/p/sandbox/github/socketio/socket.io/tree/main/examples/connection-state-recovery-example/esm?file=index.js) - [StackBlitz](https://stackblitz.com/github/socketio/socket.io/tree/main/examples/connection-state-recovery-example/esm?file=index.js)