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'));