Monday 16 January 2017

Is app.put and app.delete pointless in express when using forms

Just the other day, I was trying to figure out how to update documents and remove documents with express. I thought I was supposed to put an input tag after the form like this:
But it didn't do anything when I submitted the updated data. I soon started to figure out that the only way to update information is to use the app.post method, and then run a mongoose.update function to actually update a document. I figured out that is also the way to delete documents in mongodb as well. So I want to know if app.put and app.delete is pointless when really working information with forms or is there a way to use them with forms and I'm just doing it wrong

Submitted January 16, 2017 at 03:09PM by Design_Newbie

No comments:

Post a Comment