Last change
on this file since 519 was
519,
checked in by hendrikvanantwerpen, 11 years ago
|
- Support different environments with QED_ENV. If dev, run against qed-dev
database, if production, run against qed database. The UI indicates if
we are running in anything but production mode.
- Return undefined if we allow page leaves, because null is treated as
a value.
- Changed format of design docs, so it can work for different databases.
- Use correct design documents in configCouch, so server now actually
updates them when it starts.
|
File size:
363 bytes
|
Line | |
---|
1 | var dbNames = { |
---|
2 | dev: 'qed-dev', |
---|
3 | production: 'qed' |
---|
4 | }; |
---|
5 | var mode = process.env.QED_ENV || 'dev'; |
---|
6 | if ( !( mode in dbNames ) ) { |
---|
7 | throw new Error("Unknown environment "+mode); |
---|
8 | } |
---|
9 | module.exports = { |
---|
10 | port: process.env.PORT || 5000, |
---|
11 | couchServerURL: (process.env.CLOUDANT_URL || 'http://localhost:5984')+'/', |
---|
12 | dbName: dbNames[mode], |
---|
13 | mode: mode |
---|
14 | }; |
---|
Note: See
TracBrowser
for help on using the repository browser.