3 4 way couchbase couchbase lite sync_gateway :: online - offline - sync
This is OK! Sure!
1、use aws install ubuntu 14 (8GB),install http://www.couchbase.com/download
**Couchbase Server “3.0 b2” **Sync Gateway lates..
sudo dpkg -i install finish!
2、Setup Couchbase Server http://127.0.0.1:8091 (http://xxx.xxx.compute.amazonaws.com:8091)
** default bucket, ram set 100MB (now just for test), why, because aws ram less.
** create bucket : todos (for mobile app use)
3、Set Sync Gateway ** edit .bashrc, add => export PATH="$PATH:/opt/couchbase-sync-gateway/bin/" ** create config file, name: xxxxx
xxxx :https://github.com/couchbaselabs/ToDoLite-Android/ use this sync-gateway-config.json
but add line : “adminInterface”:":4985", change line or add : “server”: “http://127.0.0.1:8091/”,
this json use databases: todos , so sync_gateway need setup this.
***ps:setup 2, if create bucket todos, use passwoard. need add in config file. “username”: “todos”, “password”: “xxxxxxxxxx”,
4、Then > sync_gateway xxxxx
connect to http://127.0.0.1:4985/_admin/ (http://xxx.xxx.compute.amazonaws.com:4985/_admin/)
if see Welcome to Couchbase Sync Gateway. , success. and check it about have a link : todos,if have, all ok!
5、Try to download https://github.com/couchbaselabs/ToDoLite-Android
Cahnge:app/src/main/java/com/couchbase/todolite/Application.java Application.java SYNC_URL = “127.0.0.1:4984” “xxx.xxx.compute.amazonaws.com:4984”
port: 4985 for admin, 4984 for user
***ps: 2014/10/28 SYNC_URL = “http://xxx.xxx.amazonaws.com:4984/todos/";
if use this way is ok, can use.
after all, follow step for
https://github.com/couchbaselabs/ToDoLite-Android/
then play app with your server~~~~