I'm building an app using node.js + express + handlebars and was looking for a way i can pass handlebars data from the server to client-side javascript files. For example:
//server.js
var person = {
name: George,
age: 32,
}
res.render('../views/person', person)
I want to be able to use the person object on the client side such as:
//client.js
console.log(person.age);
console.log(person.name);
Can someone help?
Thanks!