curl -X PUT -H “Content-Type:application/json” http://serverip:4984/db/1 --data ‘{“created_by”:“3”}’ by this command execution , i can put data on server
curl -X GET -H “Content-Type:application/json” http://serverip:4984/db/1
by this comman execution , i got that data .
But , i didn’t see it on my bucket .
My server & sync_gateway at same machine . Here is my config.json
{
“log”:[“CRUD+”, “REST+”, “Changes+”, “Attach+”],
“interface”:":4984", “adminInterface”:":4985",
“databases”: {
“db”: {
“server”:“http://127.0.0.1:8091”,
“bucket”:“default”,
“sync”:function (doc) { channel (doc.channels); },
“users”: { “GUEST”: { “disabled”: false, “admin_channels”: ["*"] } }
}
}
}
Then, how to configure coinfig.json file ? My Server Machine’s OS is ubuntu . I installed sync_gateway package . I saw one sync_gateway at inside home/sync_gateway/ here by default has a sync_gateway.json file & data folder . I edited this sync_gateway.json file with this config.json
Another at opt/couchbase-sync-gateway/bin/ i added a config.json file here & create a data folder here & i start sync_gateway from here .
Can you tell me , what is right way to add config.json & where will i add this ?
When start sync_gateway, i got some sync_ id and data as a Document in my Bucket . And When start i got HTTP port already used fatol error. Can you explain what’s wrong now
{
“admin_channels”: {
"*": 1
},
“all_channels”: null,
“sequence”: 1,
“rolesSince”: null
} doc name: _sync::user inserted my bucket when i start sync_gateway
//when sync_gateway start ,then i got this error
Starting server on :4984 …
Failed to start HTTP server on :4985: listen tcp :4985: bind: address already in use – rest.(*ServerConfig).Serve() at config.go:624