Skip to content

Commit

Permalink
fix: can not load .model.js
Browse files Browse the repository at this point in the history
- split with .js
  • Loading branch information
Chinlinlee committed Nov 10, 2023
1 parent fd4fbd9 commit 3fe3ed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion models/mongodb/connector.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function getCollections(dirname, collectionObj) {
file.slice(-3) === ".js"
);
for (let file of jsFilesInDir) {
const moduleName = file.split(".")[0];
const moduleName = file.split(".js")[0];
console.log("moduleName :: ", moduleName);
console.log("path : ", __dirname + dirname);
collectionObj[moduleName] = require(__dirname +
Expand Down

0 comments on commit 3fe3ed4

Please sign in to comment.