File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -134,8 +134,9 @@ const myFetch = configureFetch(
134
134
Returns a middleware that will accumulate cookies. Useful on the server.
135
135
136
136
``` ts
137
- import { configureFetch , applyMiddleware , createCookieStore } from ' @krutoo/fetch-tools' ;
137
+ import { configureFetch , applyMiddleware } from ' @krutoo/fetch-tools' ;
138
138
import { cookie } from ' @krutoo/fetch-tools/middleware' ;
139
+ import { createCookieStore } from ' @krutoo/fetch-tools/utils' ;
139
140
140
141
const store = createCookieStore ();
141
142
@@ -149,11 +150,11 @@ await fetch2('https://www.world.com/');
149
150
console .log (store .getCookies ());
150
151
```
151
152
152
- ## Server support
153
+ ## Server utilities
153
154
154
155
You can use utils for simply configure your HTTP server.
155
156
156
- In Bun:
157
+ ** In Bun:**
157
158
158
159
``` ts
159
160
import { router , route } from ' @krutoo/fetch-tools' ;
@@ -168,7 +169,7 @@ Bun.serve({
168
169
});
169
170
```
170
171
171
- In Deno:
172
+ ** In Deno:**
172
173
173
174
``` ts
174
175
import { serve } from ' https://deno.land/std@0.182.0/http/server.ts' ;
@@ -184,9 +185,13 @@ await serve(
184
185
);
185
186
```
186
187
187
- In Node.js:
188
+ ** In Node.js:**
189
+
190
+ Currently there is no builtin server implementation based on fetch API interfaces.
191
+
192
+ Perhaps the implementation of such a server will appear as a separate package.
188
193
189
- > Coming soon...
194
+ ### Middleware for servers
190
195
191
196
You can use middleware for server handlers too:
192
197
You can’t perform that action at this time.
0 commit comments