var express = require('express');
var fs = require('fs');
var app = express();
app.get('/', function (req, res) {
let json = {};
fs.readFile('user.json', function (err, data) {
json += data.toString();
});
res.json(json);
});
app.listen(8000, function () {
console.log('Server Run!');
});
let json = {}; fs.readFile('user.json', function (err, data) { json += data.toString(); }); res.json(json);
fs.readFile('user.json', function (err, data) {
res.json(data.toString());
});