You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The package allows you to create a chain of native next.js middlewares without any modifications (_i.e., you can add any ready-made middleware to the chain_)
3
+
The package allows you to create a chain of native next.js proxies without any modifications (_i.e., you can add any ready-made proxy to the chain_)
> Explicitly pass the types NextRequest, NextResponse, and NextFetchEvent as generics to the chain function to ensure proper type safety and autocompletion.
26
44
27
45
## Installation
28
46
29
47
**Using npm:**
30
48
31
49
```bash
32
-
npm i @nimpl/middleware-chain
50
+
npm i @nimpl/proxy-chain
33
51
```
34
52
35
53
**Using yarn:**
36
54
37
55
```bash
38
-
yarn add @nimpl/middleware-chain
56
+
yarn add @nimpl/proxy-chain
39
57
```
40
58
41
59
## Motivation
42
60
43
-
All existing solutions work through their own APIs - made under the style of express or in their own vision. They are useful, well implemented, and convenient. But only in cases where you can update every used middleware.
61
+
All existing solutions work through their own APIs - made under the style of express or in their own vision. They are useful, well implemented, and convenient. But only in cases where you can update every used proxy.
44
62
45
63
However, there are many situations where you need to add already prepared solutions. Usually, in the issues of these solutions, you can find “support to add a chain package A, working with chain package B”.
46
64
@@ -50,12 +68,13 @@ This is not Koa and not Express, this is a package for next.js, in its unique st
0 commit comments