Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

node.js return json

server.get('/', (req, res) => {
  const user = { name: 'Hero', isLearning: true, level: 'apprentice' };
  return res.json(user);
})
Source by learn.coderslang.com #
 
PREVIOUS NEXT
Tagged: #return #json
ADD COMMENT
Topic
Name
5+8 =