how to access node global variable in Spookyjs?

148 Views Asked by At

I want to use node global variable in Spooky.js.so how I access a global variable into SpookyJS. please help me into this?

1

There are 1 best solutions below

0
muwnd On

Use .bind() functionality. Example:

var globalVar = "foo";    
var spooky = new Spooky({...}, function (err) { ... }.bind({globalVar: globalVar}));