Skip to content

Instantly share code, notes, and snippets.

@crrobinson14
Created May 20, 2016 15:34
Show Gist options
  • Save crrobinson14/3c890bcd05f43e6507c7444d5278fa92 to your computer and use it in GitHub Desktop.
Save crrobinson14/3c890bcd05f43e6507c7444d5278fa92 to your computer and use it in GitHub Desktop.
var publicApi = {},
api;
publicApi.function1 = function() {
// If you call api.myInitializer1.function1() everything should be normal here, callee, whatever...
};
publicApi.function2 = function() {
};
module.exports = {
initialize: function(_api, next) {
api = _api;
api.myInitializer1 = publicApi;
next();
},
start: function(_api, next) {
next();
},
stop: function(_api, next) {
next();
}
};
@tiomno
Copy link

tiomno commented May 21, 2016

Thank you, very handy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment