couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: code sharing across databases
Date Sat, 04 Jun 2011 19:12:26 GMT
On Sat, Jun 4, 2011 at 3:08 PM, MK <mk@cognitivedissonance.ca> wrote:
> I have a few databases with _design pages that include modules
> which get used within views/shows etc via require, eg:
>
> doc.password = require("lib/sha1").sha1(req.form.pass);
>
> These are all generic.  Right now, they are part of the _design,
> meaning they are replicated for each database, which is a bit of a
> hassle if they are changed (I have to update all the db's they are used
> in).  Is there a way I can require(code) within a _design from an
> independent database of common functions, so that I can just make
> changes to that and not have to recreate the _design for every db?
>
> I am not using couchapp (and won't be) altho I did steal the /lib idea
> from there.
>
> --
> "Enthusiasm is not the enemy of the intellect." (said of Irving Howe)
> "The angel of history[...]is turned toward the past." (Walter Benjamin)
>
>

Nope. And likely never will be. It'd be kinda weird to have to deal
with some server wide replication of that information.

Mime
View raw message