From 447905fcde8e01a39fc6685f3459c772c7a2f8c5 Mon Sep 17 00:00:00 2001 From: Lam Tran Date: Fri, 3 May 2019 12:06:27 +0200 Subject: [PATCH] Add missing require config --- extension/src/init.js | 7 +++++-- extension/src/utils.js | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/extension/src/init.js b/extension/src/init.js index ca7cb623e..e35cff99a 100644 --- a/extension/src/init.js +++ b/extension/src/init.js @@ -1,14 +1,17 @@ -const init = require('./server.js').setupServer() +const server = require('./server.js').setupServer() const utils = require('./utils') const { ensureResources } = require('./config/init/ensure-resources') +const configLoader = require('./config/config') + +const config = configLoader.load() const port = parseInt(process.env.EXTENSION_PORT || 8080, 10) const logger = utils.getLogger() if (config.keepAliveTimeout !== undefined) server.keepAliveTimeout = config.keepAliveTimeout -init.listen(port, async () => { +server.listen(port, async () => { await ensureResources() logger.info(`Server running at http://127.0.0.1:${port}/`) }) diff --git a/extension/src/utils.js b/extension/src/utils.js index 3d2f69500..a953f92fd 100644 --- a/extension/src/utils.js +++ b/extension/src/utils.js @@ -1,5 +1,6 @@ const bunyan = require('bunyan') const configLoader = require('./config/config') + const config = configLoader.load() let logger