我如何将moment.js库添加到Bluemix上的Cloudant NoSQL设计文档中 [英] How do I add the moment.js library to Cloudant NoSQL Design Doc on Bluemix
问题描述
只需在Bluemix上学习Cloudant NOSQL。我已经成功地将天气数据添加到数据库中,进行了简单的查询,甚至使用Kinetise将其拉到了移动应用程序中。我不是软件开发人员,但我是工程师。
Just learning Cloudant NOSQL on Bluemix. I have been successful adding my weather data to the database, simple queries, and even pulling it out to a mobile app using Kinetise. I am not a SW developer,but I am an engineer.
我需要访问moment.js日期数学功能,因为我相信这将有助于我汇总气象站数据相对于当前时间的过去24小时,7天和30天。我虽然不知道更好会很容易。显然,在使用Javascript日期/时间进行基本操作之外的任何事情时,您都需要做好准备。
I need to access the moment.js date math capability as I believe this will help me sum weather station data over the last 24hours, 7days, and 30d relative to the current moment in time. I though this would be easy not knowing any better. Clearly you need to saddle up when doing anything beyond the basic with Javascript dates/time.
我正在尝试创建一个使用moment.js数学功能的地图,并且可以t弄清楚如何包括该库。我看到了 lib和 require必要性的点点滴滴,只需要非常确切的帮助即可。
I am trying to create a map that uses moment.js math capabilities and can't figure out how to include that library. I saw bits and pieces of 'lib' and 'require' necessity and just need help very exactly on how to do it. Reviewed CouchdB site as well and I just don't get it.
推荐答案
您可能想查看/遵循此处的说明:
you may want to review/follow the instructions here:
> http://www.swarmforest.com/blog/how-to-use-js-libs-like-underscorejs-in-your-couchdb-views/
这里也有多个答案:
其中也许值得回顾。
这篇关于我如何将moment.js库添加到Bluemix上的Cloudant NoSQL设计文档中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!