changed server to use exports
This commit is contained in:
parent
8706b07634
commit
936a431c14
3 changed files with 7 additions and 7 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
10
server.js
10
server.js
|
@ -88,15 +88,15 @@ const startServer = (mysqlConfig) => {
|
|||
});
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
exports = {
|
||||
hello () {
|
||||
console.log('hello world');
|
||||
},
|
||||
speak (something) {
|
||||
console.log(something);
|
||||
},
|
||||
// start (config) {
|
||||
// const { mysqlConfig } = config;
|
||||
// startServer(mysqlConfig);
|
||||
// },
|
||||
start (config) {
|
||||
const { mysqlConfig } = config;
|
||||
startServer(mysqlConfig);
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue