News for hackers. Stuff that matters.
Re:SvelteKit 1.0 by Ilasky on Wednesday December 14, 2022 @12:57PM (#33987125)
Sveltekit has been an absolute DREAM to learn and use with my app! Been tracking their 1.0 progress closely and it's been incredible.

Sveltekit + TailwindCSS + FastAPI has made it super easy to whip up functionality and have a fine-tuned approach as well.

As someone else said, the "I CAN'T BELIEVE IT WAS THAT EASY" is an ongoing sentiment whenever I use it.

Looking forward to seeing it grow and gain more popularity

Re:SvelteKit 1.0 by miohtama on Wednesday December 14, 2022 @02:55PM (#33989291)
SvelteKit SSR is a very good pair to Python backends, like FastAPI.
Re:SvelteKit 1.0 by Labo333 on Wednesday December 14, 2022 @04:38PM (#33990959)
Can you expand? I don't get how you can use SSR with another language than Node. I always thought one has to use the static adapter.
Re:SvelteKit 1.0 by buttersbrian on Wednesday December 14, 2022 @11:50PM (#33995351)
the backend svelte (node) can actually make calls to the separate api server and render a 'fuller' page to the client on page load.

I believe this is what is meant.

Re:SvelteKit 1.0 by miohtama on Thursday December 15, 2022 @07:17AM (#33998353)
Requests are routed reverse proxy (Caddy) -> Vite (SSR) -> Python (Pyramid).

SSR calls your backend APIs and renders templates.

Example from SvelteKit page.ts here:

https://github.com/tradingstrategy-ai/frontend/blob/master/s...

Some remarks

- page.ts is routed by Vite for every HTTP request for SSR and then it will fetch() data over backend API

- If rendered in the client, fetch() hits directly the backend API

- Both cases the template is rendered using the same logic (Svelte HTML templating, CSS, JS)

- You are going to need a template language any cases, like Django's one. Alternative way to think this is that SvelteKit is just a super powerful template engine.

Re:SvelteKit 1.0 by delijati on Wednesday December 14, 2022 @03:17PM (#33989745)
Do i get this right, using SvelteKit SSR frontend node server and it communicates with backend FastAPI server via json. This is nowadays called a normal stack oO. (by the way i like Svelte but SvelteKit makes only sense if you stay in JS land, and i'm not willing to jump ship from python to js/ts ;))

I tried htmx and so far i really like it and the + is i just have "one" backend.