#Request Middleware

6 messages · Page 1 of 1 (latest)

dawn phoenix
#

Is it possible to always run a piece of code on certain endpoints? For example, Laravel allows you to attach an auth middleware to endpoints that prevent users not logged in from access it.
I'm finding myself repeating the same code in lots of files and it would be nice to simplify it. While still using the Vercel integration.

north sage
zinc marsh
#

seems like I need to use 'middleware' instead of 'standalone' ?

#

if I need to run a function right after the node server starts?

#

or do you know of a way to run a server function with 'standalone' ?