Hapi: Global Variables in hapi?

Created on 21 Jan 2014  路  3Comments  路  Source: hapijs/hapi

What the equivalent of app.locals (express) in hapi? Is there a way to pass around a instance variable globally?

support

Most helpful comment

All 3 comments

Server.app seems to be the place: https://github.com/spumko/hapi/blob/master/docs/Reference.md#server-properties
(a bit more explanations here too: https://github.com/spumko/hapi/blob/master/docs/Reference.md#server-options)

Duplicate of #1339

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kevinsimper picture kevinsimper  路  4Comments

jeremiahlee picture jeremiahlee  路  4Comments

arb picture arb  路  4Comments

taoeffect picture taoeffect  路  3Comments

jeffbski picture jeffbski  路  5Comments