From 8d7c85f2873555564d8de27a023a60b0f5b5b73f Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Fri, 31 Oct 2014 17:48:17 +0100 Subject: [PATCH] Move config from server.js into config.js.dist --- .gitignore | 1 + config.js.dist | 5 +++++ readme.md | 2 +- server.js | 6 +----- 4 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 config.js.dist diff --git a/.gitignore b/.gitignore index 7a7368acf..1157b14cc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ www/bower/* node_modules +/config.js diff --git a/config.js.dist b/config.js.dist new file mode 100644 index 000000000..b19d72d39 --- /dev/null +++ b/config.js.dist @@ -0,0 +1,5 @@ +module.exports = { + httpPort: 3000, + mongoUri: "mongodb://demo_user:demo_password@ds027769.mongolab.com:27769/demo_database", + mongoCollectionName: 'cryptpad' +}; diff --git a/readme.md b/readme.md index f9bfa1ef9..488b49bcc 100644 --- a/readme.md +++ b/readme.md @@ -17,7 +17,7 @@ To install: npm install npm install -g bower ## if necessary bower install - ## edit server.js to modify configuration (use your own mongodb instance) + ## copy config.js.dist to config.js and modify configuration (use your own mongodb instance) node ./server.js diff --git a/server.js b/server.js index e794811d2..537ae5f03 100644 --- a/server.js +++ b/server.js @@ -4,11 +4,7 @@ var WebSocketServer = require('ws').Server; var ChainPadSrv = require('./ChainPadSrv'); var Storage = require('./Storage'); -var config = { - httpPort: 3000, - mongoUri: "mongodb://demo_user:demo_password@ds027769.mongolab.com:27769/demo_database", - mongoCollectionName: 'cryptpad' -}; +var config = require('./config'); var app = Express(); app.use(Express.static(__dirname + '/www'));