Closed mcollina closed 4 years ago
Thanks!
It uses process.cwd()
only when no routesFolder
parameter is provided.
You can see in the example I have in the main readme, that I use path.join(__dirname, './routes')
as the routesFolder
.
Maybe I should remove the default routesFolder
parameter and throw an error if non provided.
I would recommend it. It’s easy to mess up :(, even if it’s a nice dx.
The usage of process.cwd() prevents to use this module to package routes in another module. This is common when using lerna (etc).
I would recommend accepting the folder as a parameter.