Answers for "method override"

0

method override

using method-override in your index.js
1. npm install method-override --save
2. var methodOverride = require("method-override");
3. app.use(methodOverride("_method"));
//'_method' is what methodOverride will look for
method override in your UPDATE route: 
* <form action = "/campgrounds/<%=campground._id%>/edit?_method=PUT" 
	method = "POST">
and EDIT routes:
Posted by: Guest on July-17-2020

Code answers related to "method override"

Code answers related to "Javascript"

Browse Popular Code Answers by Language