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);
|
app.use(populateLocalsDotUser);
|
||||||
|
|
||||||
// start the server
|
// start the server
|
||||||
const startServer = (mysqlConfig) => {
|
const start = (config) => {
|
||||||
|
const { mysqlConfig } = config;
|
||||||
const db = require('./models')(mysqlConfig); // require our models for syncing
|
const db = require('./models')(mysqlConfig); // require our models for syncing
|
||||||
db.sequelize
|
db.sequelize
|
||||||
// sync sequelize
|
// sync sequelize
|
||||||
|
@ -89,14 +90,8 @@ const startServer = (mysqlConfig) => {
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
hello () {
|
|
||||||
console.log('hello world');
|
|
||||||
},
|
|
||||||
speak (something) {
|
speak (something) {
|
||||||
console.log(something);
|
console.log(something);
|
||||||
},
|
},
|
||||||
start (config) {
|
start,
|
||||||
const { mysqlConfig } = config;
|
|
||||||
startServer(mysqlConfig);
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,7 +13,8 @@ module.exports = {
|
||||||
path : Path.join(__dirname, '/'),
|
path : Path.join(__dirname, '/'),
|
||||||
publicPath : '/',
|
publicPath : '/',
|
||||||
filename : 'index.js',
|
filename : 'index.js',
|
||||||
libraryExport: 'default',
|
library : '',
|
||||||
|
libraryTarget: 'commonjs-module',
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [
|
rules: [
|
||||||
|
|
Loading…
Reference in a new issue