TheRainbowPhoenix / SvelteNoKit

Svelte SSR like none would do (PHP / Python FastAPI). Using latest Svelte with vite.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Svelte SSR

Want a deep dive into Svelte SSR without SvelteKit ?

FastAPI (+ PHP) bindings to Svelte. Both using InertiaJS and Okami-forgive-what SSR script.

InertiaJS

Just some FastAPI bindings from inspired the Django port.

SSR

First time init :

python -m venv venv
venv\Scripts\activate
pip install -r requirements.txt

cd ssr_cache/svelte
pnpm i

Build the template cache (SSR) :

cd ssr_cache/svelte
pnpm run cache

Build the frontend JS (hydratation) :

cd ssr_cache/svelte
pnpm run build

Run the FastAPI : Build the template cache (SSR) :

cd ~/path/to/this-project
python -m uvicorn main:app --reload

And then open http://127.0.0.1:8000/ssr/

About

Svelte SSR like none would do (PHP / Python FastAPI). Using latest Svelte with vite.


Languages

Language:Python 37.2%Language:Svelte 27.0%Language:TypeScript 9.3%Language:Jinja 9.1%Language:JavaScript 7.0%Language:CSS 6.2%Language:HTML 4.2%