response.render('welcome-page.jade', {
title : 'Welcome user!',
remoteUser : request.remoteUser,
id : "identification"
});
// To Write a Cookie
response.writeHead(200, {
'Set-Cookie': 'mycookie=test',
'Content-Type': 'text/plain'
});
Is it possible to send also cookies at the client using "response.render", if not how can i resolve this problem?
thanks in advance.
You can use res.set to set response headers, and res.cookie to set cookies.
And as @TheHippo pointed out, you probably have to do this before you invoke render.