Move config from server.js into config.js.dist

This commit is contained in:
kpcyrd 2014-10-31 17:48:17 +01:00
parent a6b88e276c
commit 8d7c85f287
4 changed files with 8 additions and 6 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
www/bower/*
node_modules
/config.js

5
config.js.dist Normal file
View File

@ -0,0 +1,5 @@
module.exports = {
httpPort: 3000,
mongoUri: "mongodb://demo_user:demo_password@ds027769.mongolab.com:27769/demo_database",
mongoCollectionName: 'cryptpad'
};

View File

@ -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

View File

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