https://github.com/thorstenhans/spin-htmx
A sample to demonstrate how to use HTMX with Spin
https://github.com/thorstenhans/spin-htmx
Last synced: over 1 year ago
JSON representation
A sample to demonstrate how to use HTMX with Spin
- Host: GitHub
- URL: https://github.com/thorstenhans/spin-htmx
- Owner: ThorstenHans
- Created: 2023-12-23T07:05:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-29T12:36:17.000Z (about 2 years ago)
- Last Synced: 2025-03-21T15:11:01.067Z (over 1 year ago)
- Language: Rust
- Size: 57.6 KB
- Stars: 9
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spin & HTMX sample application
This is a sample application to demonstrate how to use [HTMX](https://htmx.org) with [Fermyon Spin](https://developer.fermyon.com/spin). The Spin app consists of two components:
- `app`: A static fileserver that servces the frontend (`./app`)
- `api`: A simple API implemented with Rust (`./api`)
For persistence, the app uses SQLite. The database schema is defined in `./migration.sql`.
## Running locally
To run the app locally, you must have `spin` CLI installed. See [https://developer.fermyon.com/spin/v2/install](https://developer.fermyon.com/spin/v2/install) for installation instructions.
Once you have `spin` installed, you can run the app locally by running the following command:
```bash
# Compile the sample
spin build
# Run the sample
spin up --sqlite @migration.sql