Middleware Utility for Satoshi Showdown. This module provides a function to apply a set of middleware to the Express application. It centralizes the inclusion of various middleware ensuring consistent application across the application. This includes middleware for CORS, security, JSON parsing, request logging, and error handling.
- Source:
Requires
- module:middlewares/corsSecurityMiddleware
- module:middlewares/httpSecurityMiddleware
- module:middlewares/jsonParserMiddleware
- module:middlewares/requestLoggingMiddleware
- module:middlewares/errorHandlerMiddleware
- module:utils/logUtil
Methods
(inner) applyMiddlewares(app)
Applies a predefined set of middleware to an Express application. Ensures that essential middleware are added in a consistent order for optimal functionality and security.
Parameters:
Name | Type | Description |
---|---|---|
app |
express.Application | The Express application to which middleware will be applied. |
- Source: