Skip to content

Commit

Permalink
fix database initial state and update README
Browse files Browse the repository at this point in the history
  • Loading branch information
Bechma committed Dec 30, 2023
1 parent 7706293 commit 6974641
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Sample application with:
You need to have [rust](https://www.rust-lang.org/) installed.

```bash
export DATABASE_URL=sqlite://./todosdb.sqlite
export DATABASE_URL=sqlite://./todos.sqlite
cargo run
```

Expand All @@ -31,7 +31,7 @@ cargo install cargo-watch
cargo watch -x run -w templates -w src -w assets
```

# Production
## Production

To have a production tailwind bundle

Expand All @@ -55,4 +55,15 @@ You will need to keep the `assets` and `templates` folders relative to the binar
│   └── hyperscript.org@0.9.11_dist__hyperscript.min.js
├── todosdb.sqlite
└── todox
```
```

## Rebuild database

In case you want to rebuild the sqlite database based on your `DATABASE_URL` env:
You need to have `libssl-dev` on Ubuntu or `openssl-devel` on Fedora installed.

```bash
cargo install sqlx-cli
cargo sqlx database create
cargo sqlx migrate run
```
Binary file modified todos.sqlite
Binary file not shown.

0 comments on commit 6974641

Please sign in to comment.