SyntaxFix
Write A Post
Hire A Developer
Questions
On express 3 you can use directly res.json({foo:bar})
res.json({ msgId: msg.fileName })
See the documentation