Blog App With Node Reference
Oct 29, 2020
npm init
npm i express ejs body-parser nodemon
first create structure MVCRP(model ,view,controller,routes,public )
for single page view (req.params.id is used & that button is link )
for update(req.params.id is also used and for update means on post request find index is used like )
static updateAtid(id,title,describe,name,email){
const index=items.findIndex(item=>item.id==id);
items[index].title=title;
items[index].email=email;
items[index].describe=describe;
items[index].name=name;
}
for delete (filter will be used)