From 0ce77efb6a70e6673521faa6d32c3924ac71eaab Mon Sep 17 00:00:00 2001 From: ZZ Date: Fri, 9 Jun 2023 13:30:49 +0000 Subject: [PATCH] Update index.js fix port undefined --- scripts/pkg-executable/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/pkg-executable/index.js b/scripts/pkg-executable/index.js index 58655a1f6f..dc0b747169 100644 --- a/scripts/pkg-executable/index.js +++ b/scripts/pkg-executable/index.js @@ -3,9 +3,10 @@ process.env.NC_BINARY_BUILD = 'true'; try { const app = require('express')(); const {Noco} = require("nocodb"); - const httpServer = app.listen(process.env.PORT || 8080); + const port = process.env.PORT || 8080; + const httpServer = app.listen(port); app.use(await Noco.init({}, httpServer, app)); - console.log(`Visit : localhost:${process.env.PORT}/dashboard`) + console.log(`Visit : localhost:${port}/dashboard`) } catch(e) { console.log(e) }