Monday, 29 May 2017

How may read json file partycular with (js/node.js)

I want to read users list from json file ,but I want Read only one I use node.js fs module`

app.get("/1",function(req,res)

{ fs.readfile("users.json",function(data,err){res.write(data)}} When there is /1 i want to open first user and when /2 the second



via Albert Hovhannisyan

No comments:

Post a Comment