I am trying to have a server side function return a block of code. For example, I want to send the following back after a request:
$('body').css('background-color', 'blue')
What I did was wrap this in quotes and have the following response:
res.end("$('body').css('background-color', 'blue')");
However, as I write many lines code, I want to be able to write it without quotation marks. How can I store many lines of code in one variable perhaps so that I can write res.end(codesnippet)
?
Aucun commentaire:
Enregistrer un commentaire