FSD-I NodeJS(slip14,

Slip14: Create a Simple Web Server using node js.

var http=require('http');

http.createServer(function(req,res){

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

res.write('Hello world!');

res.end();

}).listen(3010,()=>{

console.log('Active port 3010');

});



Slip13 Create a Node.js file that will convert the output "HELLO WORLD!" into lower-case letters.

var http= require('http');

http.createServer(function (req, res) {

var str = "Hello World";

res.write(str.toLowerCase());

res.end();

}).listen(8089, function () {

console.log('port 8089 is started');

});

Comments

Popular posts from this blog

Slip 11: Write node js application that transfer a file as an attachment on web and enables browser to prompt the user to download file using express js.

Slip 7 Create a node js file named main.js for event-driven application. There should be a main loop that listens for events, and then triggers a callback function when one of those events is detected.

Slip 1(a) Write an Angular 13 application addition of two numbers using ng-init, ng-model & ng-bind. And also demonstrate ng-show, ng-disabled, ng-click directives on button component.