Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Commit

Permalink
Small changes based on PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jkelvie committed Mar 11, 2019
1 parent 2f8b99a commit cf2f11e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions bin/bst-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ program
.command("start <webhookPort> <nodePorts ...>")
.description("Starts the BST server")
.action(function () {
let webhookPort: number = parseInt(process.argv[3]);
const webhookPort = parseInt(process.argv[3]);

// We typically listen on multiple ports - 5000 and 80
// All the args after the webhook port are treated as node (tunnel) ports
let serverPorts: number[] = [];
const serverPorts: number[] = [];
for (let i = 4; i < process.argv.length; i++) {
serverPorts.push(parseInt(process.argv[i]));
}
let bespokeServer = new BespokeServer(webhookPort, serverPorts);
const bespokeServer = new BespokeServer(webhookPort, serverPorts);
bespokeServer.start();
});

Expand Down
2 changes: 1 addition & 1 deletion lib/server/bespoke-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export class BespokeServer {
public async stop(): Promise<void> {
BstStatistics.instance().stop();

LoggingHelper.info(Logger, "BespkoenServer STOP");
LoggingHelper.info(Logger, "BespokenServer STOP");
process.removeListener("uncaughtException", this.uncaughtExceptionHandler);
process.removeListener("unhandledRejection", this.uncaughtExceptionHandler);
await this.nodeManager.stop();
Expand Down
4 changes: 2 additions & 2 deletions test/server/bespoke-server-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ describe("BespokeServerTest", function() {
delete process.env.SSL_CERT;
});

describe.only("ReceiveWebhook", function() {
describe("ReceiveWebhook", function() {
it("Connects and Receives Callback", function(done) {
this.timeout(2000);
// Start the server - try this new-fangled asyncawait library as I'm tired of all the callbacks
// in my unit tests
let server = new BespokeServer(8010, [9010]);
const server = new BespokeServer(8010, [9010]);
server.start();

// Connect a client
Expand Down

0 comments on commit cf2f11e

Please sign in to comment.