Browse Source

Update index.js

fix port undefined
pull/5856/head
ZZ 1 year ago committed by GitHub
parent
commit
0ce77efb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      scripts/pkg-executable/index.js

5
scripts/pkg-executable/index.js

@ -3,9 +3,10 @@ process.env.NC_BINARY_BUILD = 'true';
try { try {
const app = require('express')(); const app = require('express')();
const {Noco} = require("nocodb"); 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)); app.use(await Noco.init({}, httpServer, app));
console.log(`Visit : localhost:${process.env.PORT}/dashboard`) console.log(`Visit : localhost:${port}/dashboard`)
} catch(e) { } catch(e) {
console.log(e) console.log(e)
} }

Loading…
Cancel
Save