v-erse / svelte-django

svelte + webpack + django monorepo example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

svelte + django

This is an example app that uses Svelte for it's frontend and Django on the backend.

The Svelte frontend uses Webpack (instead of Rollup) for bundling. It uses this template.

We proxy our /api requests through to the Django backend using Webpack's devserver, as shown here.

It also uses Faker to generate fake name's and addresses for demonstration.

How to use

Install the dependencies for the frontend...

cd frontend
npm install

...and the dependencies for the backend in a python virtual environment...

cd backend
python3 -m venv env
. env/bin/activate
pip3 install -r requirements.txt

...then start the frontend devserver...

npm run dev

...open another terminal to start the django server:

python manage.py runserver

About

svelte + webpack + django monorepo example


Languages

Language:Python 59.1%Language:JavaScript 18.3%Language:Svelte 10.3%Language:CSS 8.7%Language:HTML 3.4%