Using same sync gateway function for several buckets

Hi all,

In our system, we have two buckets, mainly one for testing and the other one is for development. Right now, both need to use exactly same sync gateway function in config json. Is there a way that we write js function only once? Since I had to copy&paste and this makes config file really big.

Thanks a lot.

Unfortunately not yet, but it’s definitely something that a lot of users want.

See https://github.com/couchbase/sync_gateway/issues/1274 for more discussion around this.

Thanks.

I’m looking forward to use that new feature in our project.

@glenn,

Can you try the below images using SG-Replicate?
https://developer.couchbase.com/documentation/mobile/1.4/guides/sync-gateway/running-replications/index.html

or