Skip to content

Instantly share code, notes, and snippets.

{
"interface":":4984",
"adminInterface":":4985",
"metricsInterface":":4986",
"use_tls_server":false,
"log": ["*"],
"logging": {
"log_file_path": "/var/tmp/sglogs",
"console": {
"log_level": "debug",
{
"interface":":4984",
"adminInterface":":4985",
"metricsInterface":":4986",
"use_tls_server":false,
"log": ["*"],
"logging": {
"log_file_path": "/var/tmp/sglogs",
"console": {
"log_level": "debug",
function sync(doc, oldDoc) {
// Every document write is processed by access control function
/* Data Validation */
// Validate the presence of email field.
validateNotEmpty("email", doc.email);
// Validate that the document Id _id is prefixed by owner
{
"interface":":4984",
"adminInterface":":4985",
"metricsInterface":":4986",
"log": ["*"],
"logging": {
"log_file_path": "/var/tmp/sglogs",
"console": {
"log_level": "debug",
"log_keys": ["*"]
@rajagp
rajagp / sync-gateway-config-userprofile-demo.3.0.json
Last active November 8, 2021 04:51
sync-gateway-config-userprofile-demo.json
{
"interface":":4984",
"adminInterface":":4985",
"log": ["*"],
"logging": {
"log_file_path": "/var/tmp/sglogs",
"console": {
"log_level": "debug",
"log_keys": ["*"]
},
{
"interface":":4984",
"log": ["*"],
"logging": {
"log_file_path": "/var/tmp/sglogs",
"console": {
"log_level": "debug",
"log_keys": ["*"]
},
"error": {
{
"logging": {
"console": {
"log_keys": ["*"]
}
},
"databases": {
"db": {
"server": "couchbase://localhost",
"username": "admin",
{
"logging": {
"console": {
"log_keys": ["*"]
}
},
"databases": {
"travel-sample": {
"server": "couchbase://localhost",
"username": "admin",
@rajagp
rajagp / doc-recreated-server
Created January 12, 2021 20:51
Doc recreated on server
{
"username": "demo",
"click": "to edit",
"with JSON": "there are no reserved field names",
"count": 2,
"_sync": {
"rev": "1-d11d94c12f77e03cb08070ebd5980458",
"sequence": 34,
"recent_sequences": [
34
@rajagp
rajagp / doc-deleted
Created January 12, 2021 20:50
Step3: doc deleted on server
{
"_deleted": true,
"_sync": {
"rev": "2-d06bc90a77b80dce7d007db5681475c4",
"flags": 1,
"sequence": 33,
"recent_sequences": [
32,
33
],