title: How to live update a JSON response (Express NodeJS)
body: <p>Basically what I want to do is use express to return a JSON object when a user visits / . I know how to send something like <code>Hello World</code> or even an entire file, but I don't know how to send just a JSON object (e.g. <code>{"foo":1}</code>) in such a way that I can update the data on the client side. For example. Say I have express send the above JSON (<code>{"foo":1}</code>) when a user visits / . How can I then change the value of foo (e.g. increment it, say, every second) and return that without the client having to reload their page?</p>