-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adding global middleware support to Server
- Added `globalMiddlewares` field to `Server` struct to allow middleware execution for all routes. - Introduced `Use` method to register global middlewares. - Refactored `Listen` method by extracting route registration logic into `registerRoutes` to handle both global and route-specific middlewares. - Simplified middleware chaining through the new `registerMiddlewares` helper function.
- Loading branch information
Showing
2 changed files
with
64 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters