A repo showing various new REST routing options
Names from me for the sake of having short names in the table, if you know better ones, let me know:
+page.svelte
, endpoint code/db calls in +server.ts
+page.server.ts
+page.ts
, endpoint code/db calls in +server.ts
Basic | Comfy | Flexy | |
---|---|---|---|
SSR | ✅ | ✅ | |
Types are preserved between FE and BE w/o manual redeclaration | ✅ | ||
Endpoint can also be used alone as pure JSON one (DRY) | ✅ | ✅ | |
Minimal/not boileeplate-y | ✅ | ||
One serialization run only* | ✅ | 🟨 |
* Flexy has always min. 2 runs (devalue and fetch's .stringify/.json run) and Comfy has devalue and if you need more special types preserved potentially more than 1 as well