Commit 51419da
authored
Refactor server to run in all (Node.js compatible) runtimes and meta frameworks (#710)
Refactor the request handlers and hooks to be based on `Request` (from the fetch API) instead of `http.IncomingMessage`/`http.ServerResponse` (which are Node.js specific) as we can turn the Node.js ones into `Request`/`Response` but not the other way around. That means we can have a `handle(req, res)` method for Node.js servers and a `handleWeb(req)` for other runtimes and meta-frameworks (such as Next.js React Router, SvelteKit, etc) which both use the same core logic.1 parent ba571db commit 51419da
File tree
28 files changed
+1024
-931
lines changed- .changeset
- packages
- server
- src
- handlers
- validators
- test
- utils/src/models
- test/src
28 files changed
+1024
-931
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 | | |
16 | 19 | | |
17 | 20 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments