Categories
Express Node.js

How to fix those confusing CORS errors when calling your Express API

6 min read

Categories
ECMAScript modules Node.js

Node.js now supports named imports from CommonJS modules, but what does that mean?

5 min read Node.js v14.13.0 introduces support for named imports from CommonJS modules. Sounds great, right? But I realised I had no idea what this actually meant. Join me on my journey of discovery!

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

Categories
Node.js

What is a good directory structure for a monorepo with a Node.js back end and React front end?

3 min read

Categories
Express Node.js

How can I handle common checks across different endpoints in an Express application?

3 min read