fixed webpack!!!
This commit is contained in:
parent
657e0d6fe0
commit
22255ab713
4 changed files with 7 additions and 11 deletions
2
index.js
2
index.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
11
server.js
11
server.js
|
@ -61,7 +61,8 @@ app.set('view engine', 'handlebars');
|
|||
app.use(populateLocalsDotUser);
|
||||
|
||||
// start the server
|
||||
const startServer = (mysqlConfig) => {
|
||||
const start = (config) => {
|
||||
const { mysqlConfig } = config;
|
||||
const db = require('./models')(mysqlConfig); // require our models for syncing
|
||||
db.sequelize
|
||||
// sync sequelize
|
||||
|
@ -89,14 +90,8 @@ const startServer = (mysqlConfig) => {
|
|||
};
|
||||
|
||||
module.exports = {
|
||||
hello () {
|
||||
console.log('hello world');
|
||||
},
|
||||
speak (something) {
|
||||
console.log(something);
|
||||
},
|
||||
start (config) {
|
||||
const { mysqlConfig } = config;
|
||||
startServer(mysqlConfig);
|
||||
},
|
||||
start,
|
||||
};
|
||||
|
|
|
@ -13,7 +13,8 @@ module.exports = {
|
|||
path : Path.join(__dirname, '/'),
|
||||
publicPath : '/',
|
||||
filename : 'index.js',
|
||||
libraryExport: 'default',
|
||||
library : '',
|
||||
libraryTarget: 'commonjs-module',
|
||||
},
|
||||
module: {
|
||||
rules: [
|
||||
|
|
Loading…
Reference in a new issue