nodecellar icon indicating copy to clipboard operation
nodecellar copied to clipboard

Much more robust API (may help a lot of people)

Open dstroot opened this issue 13 years ago • 1 comments

Christophe: LOVE your tutorials! I have learned quite a bit! I wanted to give back by improving your wines api a bit -

  1. Returns proper HTML response codes
  2. Much faster! (because it returns proper response codes browser doesn't wait...)
  3. Can't crash the app by sending bad data (checks what you send it)
  4. Makes sure the browser won't cache the data (problem solved)
  5. If it can't update or delete an item you now will be notified properly
  6. res.send changed to res.json

dstroot avatar Jan 25 '13 04:01 dstroot

Christophe - sorry I put this in the master branch - kind of new to all this. Cheers.

dstroot avatar Jan 26 '13 16:01 dstroot