Hi Romakita, how are you :)
It has been a while since my last interaction with this great framework. <3
And I have a question with the following config:
@ServerSettings({
...
mount: {
api: `${rootDir}/controllers/*Ctrl.js`
},
...
If I have two controllers commentCtrl.ts and projectCtrl.ts, the order of mounting will be alphabetical and the endpoints of the commentCtrl will be registered first. But If I want to mount the projectCtrl.ts first and before commentCtrl.ts because I want to validate all project routes first, how can one achieve this?
I tried the following with no luck:
mount: {
api: `${rootDir}/controllers/projectCtrl.js ${rootDir}/controllers/commentCtrl.js`
},
Thanks again, Romakita for your support.
@m0uneer Here the solutions:
mount: {
api: [
ProjectCtrl // with manual import,
`${rootDir}/controllers/projectCtrl.js` // or with componentScan,
CommentCtrl // with manual import,
`${rootDir}/controllers/commentCtrl.js` // or with componentScan
]
},
See you :)
Thanks, bro :)
Most helpful comment
@m0uneer Here the solutions:
See you :)