Releases: honkjs/injector
Releases · honkjs/injector
v2.0.0
Accept services when creating injector middleware.
// 1.0: services were added in another middleware
const honk = new Honk()
.use(injector())
.use((app, next) => {
app.services.api = api;
return next;
}).honk;
// 2.0: Services are passed into the constructor
const honk = new Honk()
.use(injector({ api })).honk;
// Change is backwards compatible