summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBigBlueHat <byoung@bigbluehat.com>2014-01-14 14:27:27 -0500
committerGarren Smith <garren.smith@gmail.com>2014-01-15 09:01:19 +0200
commitad3edf811182045b69d5e400be34b1f0133e3e3e (patch)
tree082883ceba889fd778f81653bb88a0ca6863d358
parent42c44932863d51758b849ac15e3d545e36039621 (diff)
downloadcouchdb-ad3edf811182045b69d5e400be34b1f0133e3e3e.tar.gz
made couchserver configurable via settings.json
-rw-r--r--src/fauxton/Gruntfile.js37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/fauxton/Gruntfile.js b/src/fauxton/Gruntfile.js
index 49b52a4e9..cf70440d9 100644
--- a/src/fauxton/Gruntfile.js
+++ b/src/fauxton/Gruntfile.js
@@ -112,6 +112,28 @@ module.exports = function(grunt) {
return settings.template || defaultSettings;
}();
+ var couchserver_config = function () {
+ // add a "couchserver" key to settings.json with JSON that matches the
+ // keys and values below (plus your customizations) to have Fauxton work
+ // against a remote CouchDB-compatible server.
+ var defaults = {
+ dist: './dist/debug/',
+ port: 8000,
+ proxy: {
+ target: {
+ host: 'localhost',
+ port: 5984,
+ https: false
+ },
+ // This sets the Host header in the proxy so that you can use external
+ // CouchDB instances and not have the Host set to 'localhost'
+ changeOrigin: true
+ }
+ };
+
+ return helper.readSettingsFile().couchserver || defaults;
+ }();
+
grunt.initConfig({
// The clean task ensures all files are removed from the dist/ directory so
@@ -223,20 +245,7 @@ module.exports = function(grunt) {
},
// Runs a proxy server for easier development, no need to keep deploying to couchdb
- couchserver: {
- dist: './dist/debug/',
- port: 8000,
- proxy: {
- target: {
- host: 'localhost',
- port: 5984,
- https: false
- },
- // This sets the Host header in the proxy so that you can use external
- // CouchDB instances and not have the Host set to 'localhost'
- changeOrigin: true
- }
- },
+ couchserver: couchserver_config,
watch: {
js: {