powersync-js
powersync-js copied to clipboard
[Feature] Set WebSocket as default
Overview
This sets the WebSocket connection method to the default option when connecting to a PowerSync instance. Calls to
powersync.connect(connector)
Will now use WebSockets.
HTTP streams can be used (if needed for some reason) by manually specifying the connection method.
powersync.connect(connector, { connectionMethod: SyncStreamConnectionMethod.HTTP });
TODOS:
- [ ] Update any docs where WebSockets/HTTP are mentioned