Skip to content

Latest commit

 

History

History
43 lines (29 loc) · 1022 Bytes

ws-examples.md

File metadata and controls

43 lines (29 loc) · 1022 Bytes

Websocket Examples

Soul realtime right now only support rows changes.

Setup Environment

To follow the below examples we need to download a sample database, install Soul CLI and also a websocket client to test. (Please note that you can use any websocket client you want, e.g. Postman, Insomnia, etc.)

Download Sample Database

wget https://raw.githubusercontent.com/lerocha/chinook-database/master/ChinookDatabase/DataSources/Chinook_Sqlite.sqlite # Download sample sqlite database

Install Websocket client

npm i -g wscat # Install websocket client

Using Soul CLI

npm install -g soul-cli
soul -d ./Chinook_Sqlite.sqlite -p 8000
Or Using Local Development
git clone https://github.com/thevahidal/soul # Clone project
npm install # Install dependencies
npm link # might need `sudo`
soul -d ./Chinook_Sqlite.sqlite -p 8000

Namespaces

  1. /ws/tables Examples for Rows websockets