Can you include JSON-like data in a response using connect/express?
When users hit '/' i want to respond with all the assets but also if they are logged in I’d like to send a user object with this payload. Is this possible or do I need to make another request afterwards from the client??
You could use Express’
dynamicHelpers, or perhapshelpers: http://expressjs.com/guide.html#app.dynamichelpers()Something like this, in your app:
In your view:
Or, you could take a look at the Express expose module, which is made for this purpose!