Horje
node js return json Code Example
node.js return json
server.get('/', (req, res) => {
  const user = { name: 'Hero', isLearning: true, level: 'apprentice' };
  return res.json(user);
})
node js return json
var http = require('http');

var app = http.createServer(function(req,res){
    res.setHeader('Content-Type', 'application/json');
    res.end(JSON.stringify({ a: 1 }));
});
app.listen(3000);

// > {"a":1}




Javascript

Related
push state array react Code Example push state array react Code Example
javascript replace all Code Example javascript replace all Code Example
anchor element onclick not working Code Example anchor element onclick not working Code Example
use static pages nodejs Code Example use static pages nodejs Code Example
how to draw ellipse in javascript canvas Code Example how to draw ellipse in javascript canvas Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7