jo/couchdb-bootstrap

`_config` compilation ignores plain JS and CommonJS-style declarations

stevebest opened this issue · 2 comments

Let's say I want to define slightly different configs for my dev and prod couches. From the docs it looks like this should work:

// _config.js OR _config/index.js
module.exports = {
  "vhosts": (function (env) {
    return env === 'production'
       ? { "mydb.production-couch.com": "/mydb/_design/app/_rewrite" }
       : { "mydb.localhost:5984": "/mydb/_design/app/_rewrite" };
  })(process.env.NODE_ENV)
}

However, only _config.json seems to be recognized. Am I doing it wrong?

jo commented

That should work. Seems like a bug. Closing in favor of jo/couchdb-configure#4

jo commented

Fixed in v1.10.3