Problem:
The only way to setup a middleware that performs after the routes are loaded is defining the file to be processed by the end in the glob.
It's not easy for example to setup an error middleware to ignore the one provided by magnet.
Add lifecycle after this line: https://github.com/wedeploy/magnet/blob/master/src/magnet.js#L498
Suggestions: