Spaces:
Runtime error
Runtime error
File size: 523 Bytes
cd601a6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | const express = require('express');
const router = express.Router();
// BUG 2 (Medium): There is a syntax error below.
// The closing parenthesis for router.get() is missing,
// which will cause Node.js to crash on startup with a SyntaxError.
const users = [
{ id: 1, name: 'Alice', email: 'alice@example.com' },
{ id: 2, name: 'Bob', email: 'bob@example.com' },
{ id: 3, name: 'Charlie', email: 'charlie@example.com' }
];
router.get('/', (req, res) => {
res.json({ users: users });
};
module.exports = router;
|