incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Eden" <anthonye...@gmail.com>
Subject Re: Adding JS Libraries for Views?
Date Thu, 20 Nov 2008 13:43:45 GMT
On Thu, Nov 20, 2008 at 8:30 AM, Benoit Chesneau <bchesneau@gmail.com> wrote:
> On Thu, Nov 20, 2008 at 1:09 PM, Anthony Eden <anthonyeden@gmail.com> wrote:
>> What is the best way to add JavaScript libraries to CouchDB so that
>> they may be used in JavaScript views?
>>
>> I was thinking of somehow adding libraries to
>> /usr/local/share/couchdb/server/main.js however I'm reluctant to just
>> jump straight into doing this since it seems like a brute force way to
>> solve a problem that must be better accomplished with a more elegant
>> solution.
>>
>> Any suggestions?
>>
>> Thanks!
>>
>> Sincerely,
>> Anthony Eden
>>
>
> why would you like that ?

My current use case is to allow my views to access the DateJS library.
Ideally what I would like to have would be a way to expose custom JS
libraries across all of my views without needing to include it in each
view. Putting code in main.js is definitely less-than ideal - I'd
prefer to be able to install JavaScript code into CouchDB as a
document and have it be reusable across my views.

Sincerely,
Anthony Eden

Mime
View raw message