routes/html-routes.js
//updates json file when notes are added or deleted
updates json file when notes are added or deleted
updates json file when notes are added or deleted
function updateJson(notes) {
    fs.writeFile("db/db.json", JSON.stringify(notes), err => {
        if (err) throw err;
        return true;
    });
}
function updateJson ( notes ) { fs . writeFile ( "db/db.json" , JSON . stringify ( notes ) , err => { if ( err ) throw err ; return true ; } ) ; }
updates json file when notes are added or deleted
updates json file when notes are added or deleted