Episode 11: Building a JSON API - Input Validation and Sanitation - Part 2

twitter logo github logo ・1 min read

building-a-json-api-with-express (15 Part Series)

1) Episode 1 - Building a JSON API with docker, node.js, and Express 2) Episode 2: Building a JSON API with express - Models and MongoDB 3 ... 13 3) Episode 3: Building a JSON API - Route Structure and Setup 4) Episode 4: Building a JSON API - the C of CRUD 5) Episode 5: Building a JSON API - Read and Update 6) Episode 6: Building a JSON API - Read By ID, and Delete 7) Episode 7: Building a JSON API - Paging 8) Episode 8: Building a JSON API - Custom Sorting 9) Episode 9: Building a JSON API - Filter/search 10) Episode 10: Building a JSON API - Input Validation and Sanitation - Part 1 11) Episode 11: Building a JSON API - Input Validation and Sanitation - Part 2 12) Episode 11.5: Building a JSON API - Input Validation and Sanitation - Lightning Round 13) Episode 12: Building a JSON API - User Authentication in Under an Hour 14) Episode 13: Building a JSON API - Quickly Adding HTTPS 15) Episode 14: Building a JSON API - Twitter OAuth (OAuth 1.0)

Input validation and sanitation, mostly sanitation. Finishing up the Read route, then continuing on to Update, and Delete.

There is still more to cover, in particular the item validations, but given that is a dynamic object almost entirely, almost all we could do is escape the values that are passed to it. Does it deserve its own episode? Let me know.

Thanks for watching!

Source code:

GitHub logo NathanBland / core

Repository for the "core" video series

core

An express.js powered json api built for the "core" series.

Getting started

$ git clone git@github.com:NathanBland/core.git
$ cd core
$ docker-compose up



twitter logo DISCUSS
Classic DEV Post from Sep 22 '18

How to Improve Your Development Experience

To become a better developer, you need to think beyond coding speed. You need to improve not only your core skills but also the physical environment, tooling and your approach to problem-solving.

Nathan Bland profile image
I currently break things for a living (QA), but I love building things with node and javascript. If I'm not writing code, I'm probably outside doing something in the mountains or playing Rocket league