-
Notifications
You must be signed in to change notification settings - Fork 397
Closed
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.
Description
Description
It seems that using the directory-based import as described in the documentation does not work after upgrading to v0.10.0. Falling back to directly registering each controller works as intended. This applies when setting both, controllers and middleware.
Minimal code-snippet showcasing the problem
import { createKoaServer } from 'routing-controllers'
import { join } from 'path'
const app = createKoaServer({
controllers: [join(__dirname, '/controllers/*.*s')],
middleware: [join(__dirname, '/middleware/*.*s')]
})
app.listen(3000) // all routes will return 404 and middleware will be ignoredExpected behavior
Should keep working as it did in v0.9.0.
Actual behavior
All routes associated with registered controllers return 404 and middleware is ignored.
Metadata
Metadata
Assignees
Labels
status: needs triageIssues which needs to be reproduced to be verified report.Issues which needs to be reproduced to be verified report.type: fixIssues describing a broken feature.Issues describing a broken feature.