Browse Source

add sticky for SSL sockets

activeAddress
Matias Alejo Garcia 10 years ago
parent
commit
7faf0b68f3
  1. 4
      bws.js
  2. 20
      package.json

4
bws.js

@ -5,6 +5,8 @@ var fs = require('fs');
var ExpressApp = require('./lib/expressapp');
var WsApp = require('./lib/wsapp');
var config = require('./config');
var sticky = require('sticky-session');
var port = process.env.BWS_PORT || config.port || 3232;
@ -22,7 +24,7 @@ if (config.https) {
var startOne = function() {
var app = ExpressApp.start(config);
var server = config.https ? serverModule.createServer(serverOpts, app) :
var server = config.https ? sticky(serverModule.createServer(serverOpts, app)) :
serverModule.Server(app);
var ws = WsApp.start(server, config);
server.listen(port);

20
package.json

@ -2,7 +2,7 @@
"name": "bitcore-wallet-service",
"description": "A service for Mutisig HD Bitcoin Wallets",
"author": "BitPay Inc",
"version": "0.0.25",
"version": "0.0.26",
"keywords": [
"bitcoin",
"copay",
@ -41,6 +41,7 @@
"sjcl": "^1.0.2",
"socket.io": "^1.3.5",
"socket.io-client": "^1.3.5",
"sticky-session": "^0.1.0",
"uuid": "*"
},
"devDependencies": {
@ -58,11 +59,14 @@
"test": "./node_modules/.bin/mocha",
"coveralls": "./node_modules/.bin/istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"
},
"contributors": [{
"name": "Ivan Socolsky",
"email": "ivan@bitpay.com"
}, {
"name": "Matias Alejo Garcia",
"email": "ematiu@gmail.com"
}]
"contributors": [
{
"name": "Ivan Socolsky",
"email": "ivan@bitpay.com"
},
{
"name": "Matias Alejo Garcia",
"email": "ematiu@gmail.com"
}
]
}

Loading…
Cancel
Save