question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can we use a express middleware in hook?

See original GitHub issue

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
LoicPoullaincommented, Dec 14, 2021

It’s not possible. Foal is not designed that way. The only thing that you can do is to apply an Express middleware globally to all your application: https://foalts.org/docs/cookbook/expressjs/#pre-and-post-express-middlewares.

0reactions
LoicPoullaincommented, Jan 17, 2022

Looks like this question has been answered. I’m closing the issue 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is the role of express middleware in feathersjs when ...
The middleware abilities allow you to use standard Express middleware that may have no knowledge of Feathers hooks (like helmet or cors, or...
Read more >
why not make middleware or hooks that works ... - GitHub
Express middleware is limited by the fact that the control flows downwards to other middlewares or handlers until the response is sent. It...
Read more >
Using Async Hooks for Request Context Handling in Node.js
In this article, we will be looking at how to handle request ID tracing using Async Hooks in an Express application.
Read more >
API service composition with hooks | by David Luecke
Hooks work similar to Express middleware and can be registered before or after any service method and control data flow and errors via...
Read more >
middleware Hook Interface: Elder.js Example Project
middleware : Fired upon a request that originates from the express/polka middleware version of Elder.js. The hook has access to "req" and "next"...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found