From 89c4b006c2953f6dc489efcec254ce7321a8d5c9 Mon Sep 17 00:00:00 2001 From: bill bittner Date: Fri, 16 Mar 2018 01:06:09 -0700 Subject: [PATCH] removed the confiure page method --- react/app.js | 2 +- server.js | 18 ++++++------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/react/app.js b/react/app.js index 8096af78..641688a0 100644 --- a/react/app.js +++ b/react/app.js @@ -1,6 +1,6 @@ import React from 'react'; import { Route, Switch } from 'react-router-dom'; -import HomePage from 'pages/HomePage'; +import HomePage from 'pages/HomePage'; // or use the provided local homepage import AboutPage from 'pages/AboutPage'; import LoginPage from 'containers/LoginPage'; import ShowPage from 'pages/ShowPage'; diff --git a/server.js b/server.js index 557d3b18..4f77c8c8 100644 --- a/server.js +++ b/server.js @@ -23,11 +23,7 @@ function SpeechServer () { this.configureSlack = (slackConfig) => { require('./config/slackConfig.js').configure(slackConfig); }; - this.configureLogging = () => { - require('./helpers/configureLogger.js')(logger); - require('./helpers/configureSlack.js')(logger); - }; - this.configureApp = () => { + this.createApp = () => { // create an Express application const app = express(); @@ -77,15 +73,13 @@ function SpeechServer () { this.app = app; }; - this.initialize = (pages, models, routes) => { - this.configureLogging(); - this.configureApp(); - this.updatePages(pages); - this.updateModels(models); - this.updateRoutes(routes); + this.initialize = () => { + require('./helpers/configureLogger.js')(logger); + require('./helpers/configureSlack.js')(logger); + this.createApp(); this.server = http.Server(this.app); }; - this.blastoff = () => { + this.start = () => { const db = require('./models'); // sync sequelize db.sequelize.sync()