diff --git a/bin/bst-server.ts b/bin/bst-server.ts index cce18718..69929dd0 100644 --- a/bin/bst-server.ts +++ b/bin/bst-server.ts @@ -6,15 +6,15 @@ program .command("start ") .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(); }); diff --git a/lib/server/bespoke-server.ts b/lib/server/bespoke-server.ts index 7ff7e8d9..13506ddb 100644 --- a/lib/server/bespoke-server.ts +++ b/lib/server/bespoke-server.ts @@ -76,7 +76,7 @@ export class BespokeServer { public async stop(): Promise { 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(); diff --git a/test/server/bespoke-server-test.ts b/test/server/bespoke-server-test.ts index 27180a5d..aa312a7b 100644 --- a/test/server/bespoke-server-test.ts +++ b/test/server/bespoke-server-test.ts @@ -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