Setting Up 5 Useful Middlewares For An Express API

Building a Restful API with Express is an easy process in the fundamental phase. Once you start getting requirements in, it becomes a handcraft to keep the code clean and tidy.

I found an article that brings us some tips and modules to improve the security and performance of a Restful API.

CORS: A package for Connect/Express middleware to enable CORS with various options.

Morgan: HTTP request logger middleware for node.js

Cluster: For parallel processing and multi-core server manager.

Compression: For GZIP content compression.

Helmet: For securing Express/Connect apps with various HTTP headers.

The article also shows how to setup content through SSL and HTTPS.

Link: Setting Up 5 Useful Middlewares For An Express API