Categories
Express Node.js

How to handle request validation in your Express API

9 min read Jump links Getting to grips with JSON Schema Why should I use JSON Schema and not validation library X? How to integrate validation with JSON schemas into your application Pulling it all together Wrapping things up Handy JSON Schema links

Categories
Express Node.js

5 best practices for building a modern API with Express

4 min read Jump links Enable the full use of promises and async / await 2. Validate request data with JSON Schema 3. Use an existing format for error responses 4. Send CORS response headers so web pages can call your API 5. Separate your concerns