CouchDB 视图复制
使用 CouchDB 为客户端创建托管应用程序。我有一个工作的开发数据库,以及每个客户端的单独数据库。效果很好,问题是当我在开发上进行更改时,我必须手动将视图代码复制到每个单独的数据库中。现在我有 2 个客户了。但我的希望是增加到 100 个客户。一个小小的改变可能会花费很长时间!
我是否错过了仅复制视图方面的一些简单内容?
谢谢!
Using CouchDB to create a hosted app for clients. I have a dev database I work from, as well as separate DBs for each client. Works well, problem is when I make a change on dev, I have to manually copy the view code into each separate DB. It's fine now that I have 2 clients. But my hope is to grow to 100 clients. One small change could take a very long time!
Am I missing something simple in regards to replicating ONLY the views?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这是我通常的工作方式。
因此,为了部署到所有客户端,我将最新的设计文档放在主控上,然后所有客户端都会更新。对此有一些注意事项。您必须确保在部署到主数据库时遵守修订,以便客户端数据库知道要更新。
以下是大师 Jason Smith 的一句话:
来源
它并不像听起来那么令人困惑。但为了简化流程,您可以使用 Reupholster
(我承认,这个工具是我写的)。它主要用于 couchapps,但即使您只是推广设计文档,使用 reupholster 部署到主数据库也可能是值得的。 Reupholster 在设计文档中添加了一些方便的信息,例如日期/时间 svn 或 git 信息。这样,当您查看客户数据库时,您可以知道他们所在的设计文档。
祝你好运
Here is how I usually work.
So to deploy to all clients, I put my latest design docs on the master, then all the clients will then be updated. There are some caveats to this. You have to make sure when you deploy to the master db, that you respect the revisions, so the client dbs will know to update.
Here is a quote from the master, Jason Smith:
Source
Its not as confusing as it may sound. But to simplify the process, you can use Reupholster
(I admit, I have written this tool). It is mainly for couchapps, but even if you are just promoting design docs, it might be worth you just using reupholster to deploy to your master db. Reupholster adds in some handy info to the design doc, like date/time svn or git info. That way when you look at a clients db you can tell which design doc they are on.
Good luck
您可以仅复制设计文档;
http://wiki.apache.org/couchdb/Replication#Named_Document_Replication
You can replicate just the design docs;
http://wiki.apache.org/couchdb/Replication#Named_Document_Replication