we can for example rewrite this code

http.createServer(function (req, res) {

res.writeHead(200, { 'Content-Type': 'text/plain' });

res.write('request successfully proxied!' + '\n' + JSON.stringify(req.headers, true, 2));

res.end();

}).listen(9000);

as following:

http.createServer(function (req, res) {

res.writeHead(200, { 'Content-Type': 'text/plain' })I_WANT_TO_INFORM_YOU_THAT_THIS_LINE_IS_GOING_TO_END

res.write('request successfully proxied!' + '\n' + JSON.stringify(req.headers, true, 2))HERE_I_PUT_AGAIN_THIS_NOTIFICATION_SO_THAT_YOU_KNOW

res.end()THIS_LINE_OF_PROGRAM_HAS_BEEN_ENDED_PLEASE_NOTE_THAT

}).listen(9000)LINE_BREAK_INCOMING_BE_AWARE

Reply to this note

Please Login to reply.

Discussion

No replies yet.