Skip to content

v0.7.0 — global container helpers

Choose a tag to compare

@tshafer tshafer released this 10 Jul 19:10
· 162 commits to main since this release

Everything is a flat, easy helper now. bind(), singleton(), instance(), make(), and bound() operate on the active application — register and resolve services from anywhere without this.app:

bind("clock", () => new Date());   // transient
singleton(Mailer, (app) => new Mailer(app));
make("clock");

The whole surface: config · view · json/text/html/redirect · param/query/body · bind/singleton/instance/make · app. The this.app.* methods still work.