Hi,
I am working on a realtime application . I added a document from mobile apps using sync_gateway .But didn’t change at web automatically . What do i need for this?
Please explain
you should use SG _changes API to monitor the changed data, then trigger the UI’s rerender from web application.
do i need to edit config.json file for this? Or, i will request this api every 5 sec for any changes?
No, it is the similarly as the _changes API in CBLite.
Documentation for the _changes endpoint using HTTP GET is here:
https://developer.couchbase.com/documentation/mobile/1.4/references/sync-gateway/rest-api/index.html#!/database/get_db_changes
And for HTTP POST is here:
https://developer.couchbase.com/documentation/mobile/1.4/references/sync-gateway/rest-api/index.html#!/database/post_db_changes
Changes can be one shot, in which case you need to manage the scheduling, or you can request a continuous changes feed.