From af6c634debac8e929dbcee5e462b58b8418ae0db Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Wed, 30 Sep 2020 17:39:29 +0000 Subject: [PATCH] fix(core): update --- ts/smartuniverse.classes.universe.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ts/smartuniverse.classes.universe.ts b/ts/smartuniverse.classes.universe.ts index e4417f2..6ac5ae2 100644 --- a/ts/smartuniverse.classes.universe.ts +++ b/ts/smartuniverse.classes.universe.ts @@ -77,7 +77,13 @@ export class Universe { /** * initiates a server */ - public async start(portArg: number) { + public async start(portArg?: number) { + if (!this.options.externalServer && !portArg) { + throw new Error(`You supplied an external error. You need to specify a portArg to start on.`); + } + + portArg = portArg || 3000; // TODO: remove + // add websocket upgrade this.smartsocket = new plugins.smartsocket.Smartsocket({ port: portArg