Using CouchDB's jquery.couch.js?

走远了吗. 提交于 2019-12-03 15:13:29

Futon uses this API itself, so you can see where it includes it, as well as other dependencies it may have, depending on what you'll be doing. Since the CouchDB server can serve up HTTP requests, you can also pull in the dependencies like Futon does.

<script type="text/javascript" src="http://localhost:5984/_utils/script/jquery.couch.js"></script>

Obviously you'll change the hostname to match your couchapp's hostname.

pulkitsinghal

I agree with Dominic but also want to add that just linking directly to _utils is not a great idea because your app will not work on iPhone's safari browser. There's already a post on stackoverflow talking about this: Simple CouchDB + jQuery mobile app loads list fine in desktop browsers, just not mobile

So indeed you should use what ships with _utils as your source but instead of linking directly to it, you may want to copy it over to the vendor/couchapps directory as recommended in the post above, if you care about mobile browsers.

It looks like futon is deprecated in year 2019 and you wont get those _utils file from fauxton such as _utils/script/jquery.couch.js or jquery.js, jquery.couch.js anymore.

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