From fedb3e6820809d424738b5a9b26daaae98fc0028 Mon Sep 17 00:00:00 2001 From: hiramatsutaku Date: Mon, 24 Apr 2023 20:41:57 +0900 Subject: [PATCH] fix: convert port to number type - If port is specified from the environment variable, it may be string type --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index c00227c..9d97b22 100644 --- a/src/index.js +++ b/src/index.js @@ -79,8 +79,8 @@ class ServerlessAppSyncSimulator { this.simulators = []; if (Array.isArray(this.serverless.service.custom.appSync)) { - let port = this.options.port; - let wsPort = this.options.wsPort; + let port = Number(this.options.port); + let wsPort = Number(this.options.wsPort); for (let appSyncConfig of this.serverless.service.custom.appSync) { this.simulators.push({ amplifySimulator: await this.startIndividualServer(port, wsPort),