Hook to load middleware before any kind of core middleware is added

Hi @patrick,

Is it possible to add a hook in express for extensions that is loaded before any kind of Express middleware used by Wappler implementation? Ideally just after the Express app is created.

This is useful when trying to add other express middleware that has very specific config used for its own routes that could conflict with the main app if added after any kind of middleware used by Wappler.

Suggestion exports.init

1 Like

Directus for instance has the following hooks which is actually quite convenient as it allows you to pinpoint exactly where you want to inject your code.

app.before
app.after
routes.before
routes.after
routes.custom.before
routes.custom.after
middlewares.before
middlewares.after

I need to know the same :slight_smile: