Q12.webp
N

Q12.webp

Kizspy | Question: 12
(Choose 2 answers)
Consider the following code snippet using Express.js. Identify the parts responsible for defining a route and
starting the server.
const express = require('express');
const app = express();
app.get('/', (req, res) => {
res.send('Hello, world!");
});
app.listen(3000, () => {
});
console.log('Server is running on port 3000');
A. The require('express') statement defines the route.
B. The app.get('/', (req, res) => { ... }) statement defines the route.
C. The app.listen(3000, () => { ... }) statement starts the server.
D. The res.send('Hello, world!") statement starts the server.

Thông tin

Category
SDN302
Thêm bởi
Ngọc Lan1
Ngày thêm
Lượt xem
2,854
Lượt bình luận
12
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom