-
-
Notifications
You must be signed in to change notification settings - Fork 797
Closed
Description
Just noticed if you create a service with only a Service#setup(...) function and app.use(...) it.
You get a cryptic error message ( my guess - it's coming from express ), "Router.use() requires middleware function but got a Object".
Example:
// Error
const SomeService = {
setup(app, path) {}
}
// No Error
const AnoterService = {
setup(app, path) {},
create(data, params, cb) {}
}
app.use('/some', SomeService); // cryptic error
app.use('/another', AnotherService); // Fine
Reactions are currently unavailable