// Save data var storage = require('node-persist'); storage.init(); var people= require('./people.json'); people.forEach( (person)=>{ storage.setItem(person.id.toString(), person); }); // get data let person_11 = storage.getItem(11);
// Save data var storage = require('node-persist'); storage.init(); var people= require('./people.json'); people.forEach( (person)=>{ storage.setItem(person.id.toString(), person); }); // get data let person_11 = storage.getItem(11);
上一篇:[Node.js] Using ES6 and beyond with Node.js
下一篇:[Node.js] Scraping Dynamic JavaScript Websites with Nightmare
Node基础
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M