mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-10-27 11:32:59 +00:00
28 lines
290 B
Markdown
28 lines
290 B
Markdown
# Real World SQLx
|
|
|
|
## Usage
|
|
|
|
Declare the database URL.
|
|
|
|
```
|
|
export DATABASE_URL="postgres://postgres@localhost/realworld"
|
|
```
|
|
|
|
Create the database.
|
|
|
|
```
|
|
createdb -U postgres realworld
|
|
```
|
|
|
|
Load the database schema.
|
|
|
|
```
|
|
psql -d "$DATABASE_URL" -f ./schema.sql
|
|
```
|
|
|
|
Run.
|
|
|
|
```
|
|
cargo run
|
|
```
|