Posts about Express.js
About the Node.js series
Node.js Feb 7, 2022
In a series of blog posts, I'm going to describe an opinionated Node.js microservice architecture. Let me tell you about the why, what and how of this series.
- Node.js
- TypeScript
- Express.js
Organizing Express.js endpoints
Node.js Feb 9, 2022
Learn how to organize the endpoints in a TypeScript Express.js service. Why a REST resource should have its own DAO and why you don't need three layers.
- Node.js
- TypeScript
- Express.js
Testing Express.js endpoints with supertest
Node.js Feb 11, 2022
Learn to write Jest unit tests with supertest to test Express.js controllers in a TypeScript Node.js service.
- Node.js
- TypeScript
- Express.js
- Jest
OpenAPI input validation in Express.js
Node.js Feb 16, 2022
Learn how to validate inputs with an OpenAPI spec in a TypeScript Express.js service. Write tests for the input validation and return meaningful HTTP errors.
- Node.js
- Express.js
- TypeScript
- OpenAPI
JSON Logging with Pino in Express.js
Node.js Mar 10, 2022
Learn how to add the JSON Pino logger into a TypeScript Express.js service. Log HTTP requests automatically, avoid logging in tests and prettify the JSON logs.
- Node.js
- Express.js
- TypeScript
- Pino
JWT authentication with JWKS in Express.js
Node.js Apr 2, 2022
Learn how to implement JWT authentication with JWKS in a TypeScript Express.js service. How to disable auth locally and suppress tokens in production logs.
- Node.js
- TypeScript
- Express.js
- JWT
- Pino
Single schema multi-tenancy in Node.js with Postgres
Node.js May 21, 2022
Learn to do multi-tenancy in a single Postgres schema in a TypeScript Node.js app. Avoid performance overhead while minimizing the risk of data exposure.
- Node.js
- TypeScript
- Express.js
- Knex
- Postgres
- JWT
Organizing and testing HTTP requests
Node.js May 24, 2022
Learn to send HTTP requests with Axios in a TypeScript Node.js service. How to mock responses in local development and tests with Jest, mockserver and supertest.
- Node.js
- TypeScript
- Express.js
- Axios
- Jest
Axios HTTP error handling in Express.js
Node.js May 26, 2022
Don't catch all exceptions! Learn to handle erroneous HTTP responses of Axios with an Express.js handler returning a 500 and logging an error.
- Node.js
- TypeScript
- Express.js
- Axios
- Pino