'use strict';

var express = require('express');
var app = express('');
var fs = require('fs');

app.get('/data',(req,res) =>{
fs.readFile('data.json','utf-8',(err,data) =>{
if(err) throw err;
res.send(data);
})
})

app.get('/userInfo',(req,res) =>{
fs.readFile('data1.json','utf-8',(err,data) =>{
if(err) throw err;
res.send(data);
})
})

app.listen('8888', () =>{
console.log('ok')
})

相关文章:

  • 2021-05-17
  • 2021-04-15
  • 2021-06-16
  • 2022-12-23
  • 2021-12-21
  • 2022-12-23
  • 2021-12-18
  • 2021-12-18
猜你喜欢
  • 2021-09-12
  • 2021-04-23
  • 2021-08-21
  • 2022-12-23
  • 2021-05-08
  • 2021-04-18
  • 2021-12-19
相关资源
相似解决方案