removed the confiure page method

This commit is contained in:
bill bittner 2018-03-16 01:06:09 -07:00
parent 4d9a255a3b
commit 89c4b006c2
2 changed files with 7 additions and 13 deletions

View file

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
import { Route, Switch } from 'react-router-dom'; 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 AboutPage from 'pages/AboutPage';
import LoginPage from 'containers/LoginPage'; import LoginPage from 'containers/LoginPage';
import ShowPage from 'pages/ShowPage'; import ShowPage from 'pages/ShowPage';

View file

@ -23,11 +23,7 @@ function SpeechServer () {
this.configureSlack = (slackConfig) => { this.configureSlack = (slackConfig) => {
require('./config/slackConfig.js').configure(slackConfig); require('./config/slackConfig.js').configure(slackConfig);
}; };
this.configureLogging = () => { this.createApp = () => {
require('./helpers/configureLogger.js')(logger);
require('./helpers/configureSlack.js')(logger);
};
this.configureApp = () => {
// create an Express application // create an Express application
const app = express(); const app = express();
@ -77,15 +73,13 @@ function SpeechServer () {
this.app = app; this.app = app;
}; };
this.initialize = (pages, models, routes) => { this.initialize = () => {
this.configureLogging(); require('./helpers/configureLogger.js')(logger);
this.configureApp(); require('./helpers/configureSlack.js')(logger);
this.updatePages(pages); this.createApp();
this.updateModels(models);
this.updateRoutes(routes);
this.server = http.Server(this.app); this.server = http.Server(this.app);
}; };
this.blastoff = () => { this.start = () => {
const db = require('./models'); const db = require('./models');
// sync sequelize // sync sequelize
db.sequelize.sync() db.sequelize.sync()