Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
debug: function(optionalValue) {
console.log("Current Context");
console.log("====================");
console.log(this);
if (optionalValue) {
console.log("Value");
console.log("====================");
console.log(optionalValue);
}
}
}
});
app.engine('handlebars', exphbs.engine);
app.set('view engine', 'handlebars');
app.set('views', __dirname + '/views');
app.use(express.logger());
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.session({ secret: '123456' }));
app.use(express.static(__dirname + '/assets'));
// app.use(express.cookieSession({ secret: 'sfsdfsdfsdfsdf234234234fd', cookie: { maxAge: 123467654456 } }));
function authorizeRedirect(req, res, returnTo) {
var xeroClient = getXeroClient(null, returnTo);
xeroClient.getRequestToken(function(err, token, secret) {
if (!err) {
req.session.oauthRequestToken = token;