svelte-fastapi-template Svelte Themes

Svelte Fastapi Template

Simple template with a FastAPI backend and Svelte frontend

Svelte + FastAPI Template

A simple template combining a FastAPI backend with a Svelte frontend.

Install the following:

pip3 install fastapi uvicorn

Install the npm dependencies:

cd ./frontend
npm i

And run the following for development, which watches both the backend and frontend code (unfortunately will not auto-reload when the Svelte code changes):

(uvicorn server:app --reload & (cd ./frontend; npm run dev))

To test out the API calls, you can go to /docs for a nice interactive interface.

Top categories

Loading Svelte Themes