Skip to content

Commit

Permalink
changed router to routes in glob pattern
Browse files Browse the repository at this point in the history
Signed-off-by: Ijlal Ahmad <[email protected]>
  • Loading branch information
Thre4dripper committed Jul 10, 2024
1 parent 8ef47f2 commit b879616
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 2 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion src-javascript/config/expressConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ const server = async () => {
await loadRouters(fullPath);
} else if (
entry.isFile() &&
(entry.name.endsWith('.router.ts') || entry.name.endsWith('.router.js'))
(entry.name.endsWith('.routes.ts') || entry.name.endsWith('.routes.js'))
) {
const router = require(fullPath);
//to support both default exports in commonjs and es6
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src-typescript/config/expressConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const server = async () => {
await loadRouters(fullPath);
} else if (
entry.isFile() &&
(entry.name.endsWith('.router.ts') || entry.name.endsWith('.router.js'))
(entry.name.endsWith('.routes.ts') || entry.name.endsWith('.routes.js'))
) {
const router = require(fullPath);
//to support both default exports in commonjs and es6
Expand Down

0 comments on commit b879616

Please sign in to comment.