The following code snippet when executed, should create a web server that serves the web page 'idx.html' from 'testing5' folder. However, the syntax of lines 3 and 4 are not correct. Select the correct replacements of lines 3 and 4 from the given answer options.
1. var exp = require ('express');
2. var serveStatic = require ('serve-static');
3. var app = express()
4. .use(serveStatic(dirname /testing5, {'index': ['idx.html']}))
5. .listen(3000);
Correct Answer:
var app = expo
.use(serveStatic(_dirname +‘/testing5'.{'index': ['idx.html']]))
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Node.js MCQ Questions