Svelte-Chicago / sveltechi.dev

https://sveltechi.dev
0 stars 1 forks source link

regenerate events list on build #10

Open sjsadowski opened 2 years ago

sjsadowski commented 2 years ago

Because the cold start for lambdas is ridiculously slow and events do not need to be fetched in real time, the events themselves can be generated as a static json file. This alleviates the need for a caching strategy for events, or even using events as a store (closing #9 ) but does require that the file itself be regenerated periodically, and it makes the most sense to do this on build.

phultquist commented 2 years ago

Why not use the prerender option with SvelteKit, to generate a static site beforehand? Then, data can still be fetched from an API at build time, but in a more native-Svelte way.