I’m using expressjs to serve json.
If I try to res.end() with an object I get:
TypeError: first argument must be a string, Array, or Buffer
Is there a setting or a middleware that would automatically stringify before end or somehow make this work without putting json.stringify everywhere?
Thanks.
if you are using express there is a send method witch stringify’s it