|
|
|
|
|
by nop_slide
1095 days ago
|
|
Cool site! I just looked through your repo. I'm still relatively new to SvelteKit and rewriting a similar content based site from React. What led you to use the SSG adapter vs the node adapter (which uses SSR)? How long does the build take to pre-render all of your content pages like the sea life? Was there a particular reason you didn't want to use Form Actions? Not criticizing your decisions by the way, I'm mostly just curious about the decisions others make to learn something myself :) |
|
- I am using a rust backend for the static files and didn't want NodeJS part of the request workflow. Most pages aren't changed all that much, like maybe once every few months & so having yet another service as part of the connection flow just adds resources/delay when it's not needed. It's a lot faster/easier/cacheable to serve a static file.
- The prerender doesn't take all that long, maybe a minute or so, it's fast enough for the site as it stands, but if it got super massive it'd be a different story. I throttle how often it happens currently, so that there is a bit of time between pre-renders.
- The frontend communicates to the backend via GraphQL & the backend is not part of svelte kit, it's an entirely separate service, and so things like `page.server.ts` won't apply.