Noizrom / svelte

svelte with typescript and tailwindcss served by fastapi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Svelte Template

This is a svelte template with preinstalled features such as:

  • Typescript support
  • Python backend with FastAPI
  • Tailwind configured on the go
  • PWA configured

Installation

To install this template, run:

degit noizrom/svelte <project-name>

# then cd into the project directory
cd <project-name>

Initial Setup

To get started, run:

# Installing backend dependencies
pipenv install

# Installing fronend dependencies
pnpm install
  • note that you can also use npm or yarn to install frontend dependencies

Running the app

# Starting the backend server
pipenv run python -m server.run dev

# Starting the frontend developement server
pnpm run dev
  • the python server will run in http://localhost:7000. check the api by going to http://localhost:7000/docs

Building app for production

pnpm build

Deploying to a server

pipenv run python -m server.run
  • python server hosts public/ files directly

Todos:

  • Add simple config for ports and hostnames
  • Manage python server using poetry

About

svelte with typescript and tailwindcss served by fastapi


Languages

Language:JavaScript 36.2%Language:Svelte 20.5%Language:HTML 19.6%Language:Python 13.5%Language:CSS 8.6%Language:TypeScript 1.5%