starlette-svelte-example Svelte Themes

Starlette Svelte Example

Example project using Svelete with Starlette

starlette-svlete-example

An example of using Svelte with Starlette and Databases.

Setup

From the backend/ directory, create a new virtual environment, install the dependencies, and create the database:

python3.7 -m venv venv
. venv/bin/activate
pip install -r requirements.txt
python init_db.py

From the frontend/ directory, install the dependencies:

npm install

Running

Backend

From the backend directory (using the virtual environment), enter the following:

uvicorn app:app

Frontend

From the frontend/ directory, enter the following:

npm run dev

Then visit http://localhost:5000.

Top categories

Loading Svelte Themes