diff --git a/src/index.ts b/src/index.ts index ec6cbcc..d246220 100644 --- a/src/index.ts +++ b/src/index.ts @@ -42,10 +42,11 @@ app.set('view engine', 'pug') app.use(morgan('combined')) app.use(express.static('offsets')) let connectionCount = 0; +let publicConnectionCount = process.env.PUBLIC_CONNECTION_COUNT || connectionCount; let address = process.env.ADDRESS; app.get('/', (_, res) => { - res.render('index', { connectionCount, address }); + res.render('index', { publicConnectionCount, address }); }); app.get('/health', (req, res) => { @@ -124,4 +125,4 @@ server.listen(port); if (!address) address = `http://${await publicIp.v4()}:${port}`; logger.info('CrewLink Server started: %s', address); -})(); \ No newline at end of file +})();