All long day search similar articles and debugging the code, finally, the code can run.
i changed line 27 of index.js
from
const model = sequelize'import';
db[model.name] = model;
become
const model = (path.join(__dirname, file));
sequelize'import';
db[model.name] = model;
But i still wonder why its can work.
And then I try @lawmaina78
, its work too without changing index.js
Note: I newbie, this is my second-day doing nodejs before I'm C# Programmer.
Thanks, Ricard Debrah for the awesome article.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
All long day search similar articles and debugging the code, finally, the code can run.
i changed line 27 of index.js
from
const model = sequelize'import';
db[model.name] = model;
become
const model = (path.join(__dirname, file));
sequelize'import';
db[model.name] = model;
But i still wonder why its can work.
And then I try @lawmaina78 , its work too without changing index.js
Note: I newbie, this is my second-day doing nodejs before I'm C# Programmer.
Thanks, Ricard Debrah for the awesome article.