mirror of https://github.com/rwf2/Rocket.git
Improve bootstrapping instructions in todo example.
This commit is contained in:
parent
667a057e39
commit
527051d136
|
@ -16,14 +16,18 @@ following:**
|
||||||
|
|
||||||
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
|
||||||
|
|
Loading…
Reference in New Issue