Как добавить заголовок ответа в узле
response.writeHead(200, {'Content-Type': 'application/json'});
Cooperative Cowfish
response.writeHead(200, {'Content-Type': 'application/json'});
// a middleware with no mount path; gets executed for every request to the app
app.use(function(req, res, next) {
res.setHeader('charset', 'utf-8')
next();
});