Skip to content

Commit ce2df60

Browse files
committed
chore: update installation commands from npm to bun in middleware documentation
1 parent a656d29 commit ce2df60

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/middleware/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ Install only the dependencies you need:
1010

1111
```bash
1212
# For JWT Authentication middleware
13-
npm install jose
13+
bun install jose
1414

1515
# For Logger middleware
16-
npm install pino
16+
bun install pino
1717

1818
# For Prometheus Metrics middleware
19-
npm install prom-client
19+
bun install prom-client
2020
```
2121

2222
**Benefits of Lazy Loading:**
@@ -224,7 +224,7 @@ router.use(createCORS(corsOptions))
224224
225225
JSON Web Token authentication and authorization middleware with support for static secrets, JWKS endpoints, and API key authentication.
226226
227-
> 📦 **Required dependency**: `npm install jose`
227+
> 📦 **Required dependency**: `bun install jose`
228228
229229
#### Basic JWT with Static Secret
230230
@@ -477,7 +477,7 @@ router.get('/api/profile', (req) => {
477477
478478
Request logging middleware with customizable output formats.
479479
480-
> 📦 **Required dependency for structured logging**: `npm install pino`
480+
> 📦 **Required dependency for structured logging**: `bun install pino`
481481
> ✅ **Simple logger** (`simpleLogger`) has no dependencies - uses `console.log`
482482
483483
```javascript
@@ -542,7 +542,7 @@ router.use(createLogger(loggerOptions))
542542
543543
Comprehensive Prometheus metrics integration for monitoring and observability with built-in security and performance optimizations.
544544
545-
> 📦 **Required dependency**: `npm install prom-client`
545+
> 📦 **Required dependency**: `bun install prom-client`
546546
547547
```javascript
548548
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
11121112
| **CORS** | ✅ None | Built-in |
11131113
| **Rate Limiting** | ✅ None | Built-in |
11141114
| **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` |
11181118
11191119
**Install all optional dependencies at once:**
11201120
11211121
```bash
1122-
npm install pino jose prom-client
1122+
bun install pino jose prom-client
11231123
```
11241124
11251125
This middleware stack provides a solid foundation for most web applications with security, logging, and performance features built-in.

0 commit comments

Comments
 (0)