@@ -182,54 +182,56 @@ interface ServerHooks {
182182
183183## Environment Variables for Logging
184184
185- | Environment Variable | Default Value |
186- | -----------------------------| --------------------------------|
187- | ` LOGGER_LEVEL ` | ` info ` |
188- | ` LOGGER_NAME ` | ` process.env.npm_package_name ` |
189- | ` LOGGER_PRETTY ` | ` true ` |
190- | ` LOGGER_PRETTY_SINGLE_LINE ` | ` false ` |
185+ | Environment Variable | Default Value | Description |
186+ | -----------------------------| --------------------------------| ---------------------------------------------|
187+ | ` LOGGER_LEVEL ` | ` info ` | Log level for the application |
188+ | ` LOGGER_NAME ` | ` process.env.npm_package_name ` | Name of the logger |
189+ | ` LOGGER_PRETTY ` | ` true ` | Enable pretty logging |
190+ | ` LOGGER_PRETTY_COLORIZE ` | ` true ` | Enable colorized output for pretty-print |
191+ | ` LOGGER_PRETTY_SINGLE_LINE ` | ` false ` | Enable single-line logging |
192+ | ` SERVER_SKIP_HEALTHZ ` | ` false ` | Skip health checks route, always return 200 |
191193
192194## Default Values
193195
194- | Option | Default Value |
195- | -----------------------| -----------------------------|
196- | ` port ` | ` 3000 ` |
197- | ` host ` | ` '0.0.0.0' ` |
198- | ` cors ` | ` false ` |
199- | ` helmet ` | ` false ` |
200- | ` compression ` | ` false ` |
201- | ` bodyParser.json ` | ` { limit: '1mb' } ` |
202- | ` bodyParser.urlencoded ` | ` { extended: true, limit: '1mb' } ` |
203- | ` cookieParser ` | ` false ` |
204- | ` trustProxy ` | ` false ` |
205- | ` staticFolders ` | ` [] ` |
206- | ` isMicroservice ` | ` false ` |
207- | ` appName ` | ` 'express_app' ` |
208- | ` globalHeaders ` | ` {} ` |
209- | ` rateLimit.enable ` | ` false ` |
210- | ` rateLimit.windowMs ` | ` 900000 ` (15 min) |
211- | ` rateLimit.max ` | ` 100 ` |
212- | ` rateLimit.message ` | ` 'Too many requests' ` |
213- | ` requestLogging.enable ` | ` true ` (dev), ` false ` (prod) |
214- | ` requestLogging.ignorePaths ` | ` ['/healthz', '/favicon.ico', '/metrics', '/docs', '/.well-known'] ` |
215- | ` healthCheck.path ` | ` '/healthz' ` |
216- | ` healthCheck.detailed ` | ` true ` |
217- | ` requestTimeout ` | ` 30000 ` (30 sec) |
218- | ` responseTime.enable ` | ` false ` |
219- | ` responseTime.addHeader ` | ` true ` |
220- | ` responseTime.logOnComplete ` | ` false ` |
221- | ` requestId.headerName ` | ` 'x-request-id' ` |
222- | ` requestId.exposeHeader ` | ` true ` |
223- | ` metrics.enable ` | ` false ` |
224- | ` metrics.path ` | ` '/metrics' ` |
225- | ` serviceVersion.enable ` | ` false ` |
226- | ` serviceVersion.headerName ` | ` 'x-service-version' ` |
227- | ` serviceVersion.version ` | ` '0.0.0' ` |
228- | ` openApi.enable ` | ` false ` |
229- | ` openApi.mountPath ` | ` '/docs' ` |
230- | ` openApi.verbose ` | ` false ` |
231- | ` openApi.withGlobalPrefix ` | ` false ` |
232- | ` globalPrefix ` | ` '' ` |
196+ | Option | Default Value | Description |
197+ | -----------------------| -----------------------------| --------------------------------------------- |
198+ | ` port ` | ` 3000 ` | Port for the server |
199+ | ` host ` | ` '0.0.0.0' ` | Host for the server |
200+ | ` cors ` | ` false ` | Enable CORS |
201+ | ` helmet ` | ` false ` | Enable Helmet security headers |
202+ | ` compression ` | ` false ` | Enable response compression |
203+ | ` bodyParser.json ` | ` { limit: '1mb' } ` | JSON body parser options |
204+ | ` bodyParser.urlencoded ` | ` { extended: true, limit: '1mb' } ` | URL-encoded body parser options |
205+ | ` cookieParser ` | ` false ` | Enable cookie parsing |
206+ | ` trustProxy ` | ` false ` | Enable proxy trust |
207+ | ` staticFolders ` | ` [] ` | Static file serving folders |
208+ | ` isMicroservice ` | ` false ` | Enable microservice mode |
209+ | ` appName ` | ` 'express_app' ` | Name of the application |
210+ | ` globalHeaders ` | ` {} ` | Global headers to include in all responses |
211+ | ` rateLimit.enable ` | ` false ` | Enable rate limiting |
212+ | ` rateLimit.windowMs ` | ` 900000 ` (15 min) | Time window for rate limiting |
213+ | ` rateLimit.max ` | ` 100 ` | Maximum number of requests in the window |
214+ | ` rateLimit.message ` | ` 'Too many requests' ` | Rate limit exceeded message |
215+ | ` requestLogging.enable ` | ` true ` (dev), ` false ` (prod) | Enable request logging |
216+ | ` requestLogging.ignorePaths ` | ` ['/healthz', '/favicon.ico', '/metrics', '/docs', '/.well-known'] ` | Paths to ignore for request logging |
217+ | ` healthCheck.path ` | ` '/healthz' ` | Health check endpoint |
218+ | ` healthCheck.detailed ` | ` true ` | Enable detailed health check response |
219+ | ` requestTimeout ` | ` 30000 ` (30 sec) | Request timeout duration |
220+ | ` responseTime.enable ` | ` false ` | Enable response time tracking |
221+ | ` responseTime.addHeader ` | ` true ` | Add response time header |
222+ | ` responseTime.logOnComplete ` | ` false ` | Log response time on completion |
223+ | ` requestId.headerName ` | ` 'x-request-id' ` | Request ID header name |
224+ | ` requestId.exposeHeader ` | ` true ` | Expose Request ID header |
225+ | ` metrics.enable ` | ` false ` | Enable metrics collection |
226+ | ` metrics.path ` | ` '/metrics' ` | Metrics endpoint path |
227+ | ` serviceVersion.enable ` | ` false ` | Enable service versioning |
228+ | ` serviceVersion.headerName ` | ` 'x-service-version' ` | Service version header name |
229+ | ` serviceVersion.version ` | ` '0.0.0' ` | Service version |
230+ | ` openApi.enable ` | ` false ` | Enable OpenAPI documentation |
231+ | ` openApi.mountPath ` | ` '/docs' ` | OpenAPI documentation mount path |
232+ | ` openApi.verbose ` | ` false ` | Enable verbose OpenAPI documentation |
233+ | ` openApi.withGlobalPrefix ` | ` false ` | Use global prefix for OpenAPI routes |
234+ | ` globalPrefix ` | ` '' ` | Global prefix for all routes |
233235
234236---
235237
0 commit comments