1
0
mirror of https://github.com/actix/examples synced 2025-06-27 01:27:43 +02:00

update sqlx dep to 0.7

This commit is contained in:
Rob Ede
2023-07-09 02:05:10 +01:00
parent 4bfe63857e
commit 1ca11e70e8
11 changed files with 524 additions and 103 deletions

View File

@ -6,12 +6,13 @@ A simple Todo project using a SQLite database.
- SQLite 3
## Change Into This Project Sub Directory
## Change Into The Examples Workspace Root Directory
All instructions assume you have changed into this folder:
All instructions assume you have changed into the examples workspace root:
```sh
cd basics/todo
```pwd
$ pwd
.../examples
```
## Set Up The Database
@ -34,7 +35,7 @@ sqlx migrate run
Start the application with:
```sh
cargo run
cargo run --bin=todo
```
The app will be viewable in the browser at <http://localhost:8080>.
@ -44,5 +45,5 @@ The app will be viewable in the browser at <http://localhost:8080>.
For simplicity, this example uses SQLx's offline mode. If you make any changes to the database schema, this must be turned off or the `sqlx-data.json` file regenerated using the following command:
```sh
DATABASE_URL="sqlite://$(pwd)/todo.db" cargo sqlx prepare
cargo sqlx prepare --database-url=sqlite://./todo.db
```