Improve bootstrapping instructions in todo example.

This commit is contained in:
Katrina Brock 2017-08-12 18:47:58 -07:00 committed by Sergio Benitez
parent 667a057e39
commit 527051d136
1 changed files with 13 additions and 9 deletions

View File

@ -14,17 +14,21 @@ following:**
1. A SQLite database file with the proper schema is present. 1. A SQLite database file with the proper schema is present.
On a Unix machine or with bash installed, you can simply run the On a Unix machine or with bash installed, you can simply run the
`boostrap.sh` script to create the database. The script installs the `boostrap.sh` script to create the database. The script installs the
`diesel_cli` tools if they're not already installed and runs the migrations. `diesel_cli` tools if they're not already installed and runs the
The script will output a `DATABASE_URL` variable. migrations. The script will output a `DATABASE_URL` variable.
You can also run the migrations manually with the following commands: You can also install the Diesel CLI and run the migrations manually with
the following commands:
``` ```
cargo install diesel_cli # install diesel CLI tools # install Diesel CLI tools
DATABASE_URL=db/db.sql diesel migration run # create db/db.sql cargo install diesel_cli --no-default-features --features sqlite
```
# create db/db.sql
DATABASE_URL=db/db.sql diesel migration run
```
2. A `DATABASE_URL` environment variable is set that points to the SQLite 2. A `DATABASE_URL` environment variable is set that points to the SQLite
database file. database file.