Slip 1 - A) Create a Node.js file that will convert the output "Hello World!"into upper-case letters.

 Solution:

var http = require('http');

var uc = require('upper-case');

http.createServer(function (req, res) {

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

  res.write(uc.upperCase("Hello World!"));

  res.end();


}).listen(8080);

Post a Comment

0 Comments