mirror of https://github.com/rwf2/Rocket.git
Improve bootstrapping instructions in todo example.
This commit is contained in:
parent
8c2e435298
commit
1b5ba63fd0
|
@ -14,17 +14,21 @@ following:**
|
|||
|
||||
1. A SQLite database file with the proper schema is present.
|
||||
|
||||
On a Unix machine or with bash installed, you can simply run 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.
|
||||
The script will output a `DATABASE_URL` variable.
|
||||
On a Unix machine or with bash installed, you can simply run 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. 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
|
||||
DATABASE_URL=db/db.sql diesel migration run # create db/db.sql
|
||||
```
|
||||
```
|
||||
# install Diesel CLI tools
|
||||
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
|
||||
database file.
|
||||
|
|
Loading…
Reference in New Issue