Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jokull/jokull-sunna-rsvp
https://github.com/jokull/jokull-sunna-rsvp
Last synced: 13 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/jokull/jokull-sunna-rsvp
- Owner: jokull
- Created: 2021-02-01T23:23:45.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-25T19:31:19.000Z (over 3 years ago)
- Last Synced: 2024-12-17T03:58:30.888Z (15 days ago)
- Language: Svelte
- Size: 4.63 MB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastAPI + Sapper
This project is an attempt to create a nice DX with Sapper and FastAPI. It is
one repo with a frontend and backend. In `DEBUG` the FastAPI uvicorn development
server (port 8000) receives all requests and proxies directly to Sapper (port 3000) unless there are FastAPI routes defined.In non-`DEBUG` mode a static server serves from `__sapper__/export` instead.
Sapper has Tailwind CSS configured.
FastAPI uses SQLite for data.
## Start
Create an `.env` file like this:
```
FRONTEND_URL=http://localhost:3000
API_HOST=localhost:8000
API_URL=http://localhost:8000/api
DATABASE_URL=sqlite:///./database.db
``````bash
yarn install
poetry install
```Start dev servers
```bash
yarn run dev # in tab 1
DEBUG=true poetry run uvicorn api:app --host 0.0.0.0 --reload-dir api # in tab 2
```## Deploying
Have a look at `render.yaml` - it gives you the environment variables, disks and
build/start commands. Again, in production you get a static build with a
minimized Parcel bundle, purged Tailwind etc.