nark: 1
27
Total Marks: 50
Vol 8
Font: Microsoft Sans Serif
Size: 10
Time Left:55:26
Multiple Choices
const http = require('http');
const hostname = '127.0.0.1'; const port = 3000;
(Choose 1 answer)
const server = http.createServer((req, res) => {
Looking at the code below, what does the console show?
res.statusCode = 200; res.setHeader("Content-Type", "text/plain"); res.end("Hello World");
A. server running at
http://localhost:4000/
});server.listen(port, hostname, () => { console.log('server running at http://${hostname}:${port}/'); });
B. server running at port 3000
C. server running at
http://localhost:3000/
D. server running at
http://127.0.0.1:3000/