How do I push from a couchdb server to a touchdb client?

送分小仙女□ 提交于 2019-12-25 03:53:22

问题


I am trying to push data from my couchdb server to a touchdb app (grocery-sync sample) running on an android x86 vm. The replication with the app works normally where the app does the pulling and pushing. I am unable to push from the server to the touch db client. When I try I get the following error:

{"error":"db_not_found","reason":"couldnotopenhttp://192.168.100.101/grocery-sync/"}.

Any assistance will be appreciated. Thanks.


回答1:


You almost certainly do not want to do this. You should assume that your mobile clients will be on dynamic IP addresses. Switching between wi-fi and cellular will create a new IP address. The server needs a URL to replicate to.

TouchDB was designed for the use case of the mobile client pulling from the server. In order to push to the client, TouchDB will need to handle all the correct HTTP requests which the server will make. Many of these don't make sense for the current use cases of TouchDB, so I doubt that they will be added anytime soon.



来源:https://stackoverflow.com/questions/14825154/how-do-i-push-from-a-couchdb-server-to-a-touchdb-client

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!