Browse Source

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

master
kpcyrd 6 years ago
parent
commit
8d7c85f287
4 changed files with 8 additions and 6 deletions
  1. 1
      .gitignore
  2. 5
      config.js.dist
  3. 2
      readme.md
  4. 6
      server.js

1
.gitignore

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

5
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'
};

2
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

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

Loading…
Cancel
Save