Advertisement
loloof64

Nodejs and express : setting response values with JSON

May 30th, 2014
2,389
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. app.get('/', function(req,res){
  2.   res.set({
  3.     'Content-Type' : 'text/plain',
  4.     'charset' : 'utf-8'
  5.   });
  6.   res.end('Vous êtes à l\'accueil.');
  7. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement