私はオフライン機能を持つサンプルアプリケーションを作成していました。Couchbaseサーバーと同期ゲートウェイが同期していません
ローカルマシンでホストされているソファサーバーに2つのバケットがあります。最初はrestful-sample
、もう1つはsync_gateway
です。今私はすでにバックエンド用のAPIコードを書いており、CRUDはうまく動作しています。 restful-sample
については、これは私のプロジェクトにあるconfig.json
です。
- app
- models
- node_modules
- public
- routes
- app.js
- config.json <-- this one
...
config.json
{
"couchbase": {
"server": "127.0.0.1:8091",
"bucket": "restful-sample",
"password": "123456"
}
}
そして私も、私のマシン上でsync_gateway
をインストールし、私はまた、このJSONの設定も同じプロジェクトに位置しています。
- app
- models
...
- config.json
- syncgw-config.json <-- this one
...
syncgw-config.json
{
"interface": ":4987",
"adminInterface": ":4988",
"log": ["CRUD", "CRUD+", "HTTP", "HTTP+", "Access", "Cache", "Shadow", "Shadow+", "Changes", "Changes+"],
"databases": {
"cool_app": {
"server": "http://localhost:8091",
"bucket": "sync_gateway",
"sync": `function(doc) {
channel(doc.channels);
}`,
"users": {
"GUEST": {
"disabled": false,
"admin_channels": ["*"]
}
},
"shadow": {
"server": "http://localhost:8091",
"bucket": "restful-sample",
"password": "cuaju_05"
}
}
}
}
最初のバケットrestful-sample
はすでにクライアント側から直接書き込ま私が作成したAPIを介して保存され、その上にいくつかのデータを有しています。私は同期のゲートウェイはバケットrestful-sample
からhttp://localhost:4987/cool_app/
しかしに文書をスムーズに実行されているが同期も私のマシン上でローカルに実行Couchbaseのサーバ上sync_gateway
バケツに表示されていない./sync_gateway '/var/www/html/couchtest/syncgw-config.json'
を実行しようとした
。
ここで私の質問は正しいのですか? restful-sample
からsnyc_gateway
までのデータを見たいと思っていますが、あまり期待していますか? (LOL)
とにかく前もって感謝します。