You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 17, 2019. It is now read-only.
Plugins should not use any singleton module objects. Instead, the register() method should create a new instance of the "globals" you need and pass that to the routes or other methods defined.
The text was updated successfully, but these errors were encountered:
I'll definitely add a caveat to the readme for this in the short term. I think for most use-cases only a single server would want to load this plugin anyway - i.e. the one that handles the main sessions that you want in primus. I think trying to make that work with multiple servers would make it very complicated.
(I'm still getting to grips with hapi so I may well be wrong on that).
You just need to move all your module globals into a prototype and then new that object inside register. Pretty simple. We do this in every other plugin.
Plugins should not use any singleton module objects. Instead, the
register()
method should create anew
instance of the "globals" you need and pass that to the routes or other methods defined.The text was updated successfully, but these errors were encountered: