Node.js Code Completion Easy +10 XP
Express Route
Complete the GET route definition.
Node.jsFill in the blank
app.___("api/users", (req, res) => {
res.json(users);
});Type the missing code
Show answer and explanation
Answer: get
app.get() defines a handler for HTTP GET requests to the specified path.
Hint: Which HTTP method retrieves data?
What this challenge tests
Code Completion in Node.js: express, routing.