From 2847060144af18bb2644a828f6e70c34d98aa118 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Tue, 17 Apr 2018 14:23:03 -0700 Subject: [PATCH] simplified config methods in server class --- server/helpers/handlePageRender.jsx | 2 -- server/helpers/handleShowRender.jsx | 2 -- server/index.js | 22 ++++------------------ 3 files changed, 4 insertions(+), 22 deletions(-) diff --git a/server/helpers/handlePageRender.jsx b/server/helpers/handlePageRender.jsx index 0e1416fa..5f46b9ca 100644 --- a/server/helpers/handlePageRender.jsx +++ b/server/helpers/handlePageRender.jsx @@ -54,6 +54,4 @@ module.exports = (req, res) => { // send the rendered page back to the client res.send(renderFullPage(helmet, html, preloadedState)); - - console.log('hello from spee.ch handlePageRender.jsx'); }; diff --git a/server/helpers/handleShowRender.jsx b/server/helpers/handleShowRender.jsx index 907b3495..77c8965b 100644 --- a/server/helpers/handleShowRender.jsx +++ b/server/helpers/handleShowRender.jsx @@ -73,6 +73,4 @@ module.exports = (req, res) => { // send the rendered page back to the client res.send(renderFullPage(helmet, html, preloadedState)); }); - - console.log('hello from spee.ch handleShowRender.jsx'); }; diff --git a/server/index.js b/server/index.js index b3f52377..d5bdc2cb 100644 --- a/server/index.js +++ b/server/index.js @@ -15,24 +15,10 @@ const siteConfig = require('siteConfig.js'); const slackConfig = require('slackConfig.js'); function Server () { - this.configureLogger = (userConfig) => { - loggerConfig.update(userConfig); - }; - this.configureMysql = (userConfig) => { - mysqlConfig.update(userConfig); - }; - this.configureSite = (userConfig) => { - siteConfig.update(userConfig); - }; - this.configureSlack = (userConfig) => { - slackConfig.update(userConfig); - }; - this.configureModels = () => { - logger.debug('here is where you could add/overwrite the default models') - }; - this.configureRoutes = () => { - logger.debug('here is where you could add/overwrite the default routes') - }; + this.configureLogger = loggerConfig.update(userConfig); + this.configureMysql = mysqlConfig.update(userConfig); + this.configureSite = siteConfig.update(userConfig); + this.configureSlack = slackConfig.update(userConfig); this.createApp = () => { // create an Express application const app = express();