Correct Answer: Events-handlers
Explanation:
Note: This Question is unanswered, help us to find answer for this one
Node.js Skill Assessment
Your Skill Level: Poor
Retake Quizzes to improve it
More Node.js MCQ Questions
True or false? Node.js is multi-core by nature.
Which of the following statements are true about the module.exports object?
Node.js is a truly parallel technology.
Given the following route and request, which Request object property will hold the value of 20 in the Express handler? Route: '/post/:id' Request: '/post/30?start=20'
The process object is an instance of____?
Which two of the following statements will generate the output 'Hello Node.js'?
Which of the following statements are NOT true about promises in Node.js?
Which of the following is/are not (a) valid state(s) of promise used in Node.js?
A Node.js application consists of an HTML file named ‘idx.html' and a JavaScript file 'ht3.js'. The file ht3.js when executed, should display the content of 'idx.html' file on the web browser. However, the file 'ht3.js' contains some errors. Identify which code lines contain an error. 1. var http = require(‘http'); 2. var fs; 3. function send404(response){ 4. response.writeHead(404. ['Content—Type' :‘text/plain'}); 5. response.write('Error 404: Resource not found'); 6. response.end0: 7. } 8. var server =http.createServer(function(req. res)[ 9. if(req.method = 'GET', req.url =‘/')[ 10. res.writeHead(200, ['content-type' : 'text/html'}); 11. fs.createReadStream('idx.html') 12. ] 13. else[ 14. send404fres); 15. ] 16. ]).listen(3000); 17. console.logf'server running on port 3000');
The following program was designed to create an Express app that displays the output 'Working with Express' on the web browser. But the program contains some errors. Identify which code lines contain an error. 1) var exp1= require('express'); 2) var http: require('http‘); 3) var newapp = exp1() 4) use(function(req. res. next) [ 5) res.end('Working with Express'); 6) i): 7) https.createServer(newapp).listen(3000);