I am a senior front end developer mainly working with react and react native. I have just picked up a project and decided to ho full stack on it 😅🙏. Therefore, decided to go with react, react native, express, mongoose(testing) but will switch to dynamo aws, and node js for my rest api.So far everything is simple and i am really enjoying it. Express router makes things easy.. joi for validation is a joy, jsonwebtoken, mongoose etc its all perfect so far. My only issue is when to use PUT and PATCH. I have done some research and i know that PATCH is used to replace a single key/value pair and PUT is for the whole record. But i can replace single key/value pair with PUT too...So do companies actually use PATCH and when should i use it? What would my router.patch code look like? And what my router.put code should look like?I know it may be a stupid question but i am new to backend development so sorry guys
Submitted September 25, 2020 at 01:29PM by monir_sh
No comments:
Post a Comment