Skip to content

Commit

Permalink
Message broker and bws runs
Browse files Browse the repository at this point in the history
  • Loading branch information
micahriggan committed Mar 19, 2019
1 parent 2d78ecb commit af68bf6
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 29 deletions.
23 changes: 8 additions & 15 deletions packages/bitcore-wallet-service/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/bitcore-wallet-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"morgan": "^1.9.1",
"mustache": "^2.1.0",
"npmlog": "^0.1.1",
"preconditions": "^2.2.1",
"preconditions": "^2.2.3",
"read": "^1.0.5",
"request": "^2.53.0",
"request-promise-native": "^1.0.5",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
'use strict';

export class ClientError {
export class ClientError extends Error {
code: string;
message: string;
constructor(...args) {
super()
switch (args.length) {
case 0:
this.code = 'BADREQUEST';
Expand Down
4 changes: 2 additions & 2 deletions packages/bitcore-wallet-service/src/lib/server.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { ClientError } from "./errors/clienterror";
import { IWallet } from './model/wallet';
'use strict';

import * as _ from 'lodash';
import * as $ from 'preconditions';
import * as async from 'async';
import * as log from 'npmlog';
import { ITxProposal, TxProposal } from './model/txproposal';
import { Storage } from './storage';
import { INotification } from './model/notification';
const $ = require('preconditions').singleton();
var serverMessages = require('../serverMessages');
var BCHAddressTranslator = require('./bchaddresstranslator');

Expand All @@ -28,7 +29,6 @@ var Utils = Common.Utils;
var Constants = Common.Constants;
var Defaults = Common.Defaults;

var ClientError = require('./errors/clienterror');
var Errors = require('./errors/errordefinitions');

var Lock = require('./lock');
Expand Down
2 changes: 0 additions & 2 deletions packages/bitcore-wallet-service/src/lib/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1571,5 +1571,3 @@ export class Storage {
);
}
}

module.exports = Storage;
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

'use strict';

import io = require('socket.io');
var $ = require('preconditions').singleton();
var io = require('socket.io');
var log = require('npmlog');
log.debug = log.verbose;

Expand All @@ -13,7 +13,7 @@ var opts = {
port: parseInt(process.argv[2]) || DEFAULT_PORT,
};

var server = io(opts.port);
var server = io(opts.port.toString());
server.on('connection', function(socket) {
socket.on('msg', function(data) {
server.emit('msg', data);
Expand Down
12 changes: 6 additions & 6 deletions packages/bitcore-wallet-service/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ run_program ()
fi
}

run_program messagebroker/messagebroker.js pids/messagebroker.pid logs/messagebroker.log
run_program bcmonitor/bcmonitor.js pids/bcmonitor.pid logs/bcmonitor.log
run_program emailservice/emailservice.js pids/emailservice.pid logs/emailservice.log
run_program pushnotificationsservice/pushnotificationsservice.js pids/pushnotificationsservice.pid logs/pushnotificationsservice.log
run_program fiatrateservice/fiatrateservice.js pids/fiatrateservice.pid logs/fiatrateservice.log
run_program bws.js pids/bws.pid logs/bws.log
run_program ./ts_build/messagebroker/messagebroker.js pids/messagebroker.pid logs/messagebroker.log
run_program ./ts_build/bcmonitor/bcmonitor.js pids/bcmonitor.pid logs/bcmonitor.log
run_program ./ts_build/emailservice/emailservice.js pids/emailservice.pid logs/emailservice.log
run_program ./ts_build/pushnotificationsservice/pushnotificationsservice.js pids/pushnotificationsservice.pid logs/pushnotificationsservice.log
run_program ./ts_build/fiatrateservice/fiatrateservice.js pids/fiatrateservice.pid logs/fiatrateservice.log
run_program ./ts_build/bws.js pids/bws.pid logs/bws.log

0 comments on commit af68bf6

Please sign in to comment.