@@ -10,13 +10,13 @@ Install only the dependencies you need:
10
10
11
11
``` bash
12
12
# For JWT Authentication middleware
13
- npm install jose
13
+ bun install jose
14
14
15
15
# For Logger middleware
16
- npm install pino
16
+ bun install pino
17
17
18
18
# For Prometheus Metrics middleware
19
- npm install prom-client
19
+ bun install prom-client
20
20
```
21
21
22
22
** Benefits of Lazy Loading:**
@@ -224,7 +224,7 @@ router.use(createCORS(corsOptions))
224
224
225
225
JSON Web Token authentication and authorization middleware with support for static secrets, JWKS endpoints, and API key authentication.
226
226
227
- > 📦 **Required dependency**: ` npm install jose`
227
+ > 📦 **Required dependency**: ` bun install jose`
228
228
229
229
#### Basic JWT with Static Secret
230
230
@@ -477,7 +477,7 @@ router.get('/api/profile', (req) => {
477
477
478
478
Request logging middleware with customizable output formats.
479
479
480
- > 📦 **Required dependency for structured logging**: ` npm install pino`
480
+ > 📦 **Required dependency for structured logging**: ` bun install pino`
481
481
> ✅ **Simple logger** (` simpleLogger` ) has no dependencies - uses ` console .log `
482
482
483
483
` ` ` javascript
@@ -542,7 +542,7 @@ router.use(createLogger(loggerOptions))
542
542
543
543
Comprehensive Prometheus metrics integration for monitoring and observability with built-in security and performance optimizations.
544
544
545
- > 📦 **Required dependency**: ` npm install prom- client`
545
+ > 📦 **Required dependency**: ` bun install prom- client`
546
546
547
547
` ` ` javascript
548
548
import {createPrometheusIntegration } from ' 0http-bun/lib/middleware/prometheus'
@@ -1112,14 +1112,14 @@ For your convenience, here's a quick reference of which dependencies you need to
1112
1112
| **CORS** | ✅ None | Built-in |
1113
1113
| **Rate Limiting** | ✅ None | Built-in |
1114
1114
| **Logger** (simple) | ✅ None | Built-in |
1115
- | **Logger** (structured) | 📦 ` pino` | ` npm install pino` |
1116
- | **JWT Authentication** | 📦 ` jose` | ` npm install jose` |
1117
- | **Prometheus Metrics** | 📦 ` prom- client` | ` npm install prom- client` |
1115
+ | **Logger** (structured) | 📦 ` pino` | ` bun install pino` |
1116
+ | **JWT Authentication** | 📦 ` jose` | ` bun install jose` |
1117
+ | **Prometheus Metrics** | 📦 ` prom- client` | ` bun install prom- client` |
1118
1118
1119
1119
**Install all optional dependencies at once:**
1120
1120
1121
1121
` ` ` bash
1122
- npm install pino jose prom- client
1122
+ bun install pino jose prom- client
1123
1123
` ` `
1124
1124
1125
1125
This middleware stack provides a solid foundation for most web applications with security, logging, and performance features built-in.
0 commit comments