// ajax 请求4部曲
let xhr = new XMLHttpRequest();
xhr.open('GET','/api/user',true);
xhr.onload = function () {
console.log(xhr.response);
}
xhr.send();
let express = require('express');
let app = express();
app.get('/api/user',(req,res)=>{
res.json({name:'珠峰架构'})
});
app.listen(4000);