Content with Style

Web Technique

Express.js Route Middleware

by Pascal Opitz on January 18, 09:12

I have just read the about the Route Middleware of express.js, and it already helped me to get rid of about 100 lines of code.

This approach is really useful for managing permission and global objects, but at the same time so much more neat than the init() method in the Zend Framework Controllers.

Lovin it!