Wrapper for quickly integrating sharedb in your express server. Use along with Postgresql.
npm install sharedb-wrapperA simple sharedb wrapper for both client and server side.
client include:
- abstract most init logic into get function
- reconnect mechanism
- unified event interface
server: for used along with express and postgresql. includes:
- access control
- metadata injection (for ops)
- adopt postgresql
- milestone db
- inject session data
- doc.on("error") -> sharedb-wrapper.on("error")
- connection.on("close") -> sharedb-wrapper.on("close")
You can use sharedb-wrapper for only your frontend, but keep your original infrastructure without using express or postgresql.
To use sharedb-wrapper in frontend, include client.bundle.min.js and create a sharedb-wrapper object: