// 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);
时间: 2024-11-06 09:30:02