Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/d-sanderson/little-libraries-abq
https://github.com/d-sanderson/little-libraries-abq
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/d-sanderson/little-libraries-abq
- Owner: d-sanderson
- Created: 2023-11-05T02:03:49.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-11-05T06:30:48.000Z (about 1 year ago)
- Last Synced: 2024-04-17T05:05:50.205Z (9 months ago)
- Language: CSS
- Size: 234 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example little library app with the htmx hono hyperleaflet and cloudflare d1 storage
![image](https://github.com/d-sanderson/little-libraries-abq/assets/43357044/24646426-327a-4a38-8ba4-7142c7060225)
- [hono.dev](https://hono.dev) provides a familiar express style router and jsx
- [htmx.org](https://htmx.org) powers ajax partial html fetching## Todo example app
This demo is built to deploy to Cloudflare Workers and uses the Cloudflare D1 SQLite db.
## Setup
Install wrangler:
```
npm install -g wrangler
```Setup `wrangler.toml` file:
```
cp wrangler.toml.example wrangler.toml
```Setup a Cloudflare D1 sqlite database:
```
wrangler d1 create htmljs-todo-example --experimental-backend
```Copy the ouput starting `[[d1_databases]]` to the end of your `wrangler.toml` file.
Load db with schema an example data:
```
wrangler d1 execute htmljs-todo-example --local --file=./db/schema.sql
```Install dependencies and run dev server:
```
pnpm install
pnpm run dev
# In sepate terminal run tailwindcss build watcher
pnpm run dev:css
``````
pnpm run deploy
```