Consider the Express.js route below. What will be the response
4 phương ánCó giải thíchDễ
if the user visits /welcome? app.get('/welcome', (req, res) => {
res.send("Hello, Express!");
});
Các phương án trả lời
Chọn một phương ánLời giảiChọn phương án để mở
Khi người dùng truy cập đường dẫn /welcome, ứng dụng Express.js sẽ thực hiện chức năng xử lý yêu cầu (app.get) và gửi phản hồi (res.send) với nội dung 'Hello, Express!'. Điều này có nghĩa là người dùng sẽ thấy nội dung 'Hello, Express!' khi truy cập đường dẫn /welcome. Vì vậy, câu trả lời đúng là 'The text "Hello, Express!"'.
Cùng chương 3
______ is a fast, unopinionated and minimalist web framework for Node.jsCó lời giảiCâu hỏiHow do you add middleware to an Express application?Có lời giảiCâu hỏiConsider the following code snippet using Express.js. Identify which routes handle GET and POST requests. app.get('/users', ...); app.post('/users', ...); app.listen(3000, ...) (Choose 2 answers)Có lời giảiCâu hỏiCả 24 câu của chủ đề24 câu