express send() and routing

PHOTO EMBED

Tue Aug 31 2021 05:37:21 GMT+0000 (UTC)

Saved by @faisals #node

const monsters = [
  { type: 'werewolf' }, 
  { type: 'hydra' }, 
  { type: 'chupacabra' }
];
app.get('/monsters', (req, res, next) => {
  res.send(monsters);
});
content_copyCOPY