Skip to content

jordaneremieff/starlette-svelte-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.