docs: note automatic migrations in README
This commit is contained in:
11
README.md
11
README.md
@@ -44,23 +44,18 @@ Starts PostgreSQL and the server together:
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
The server will be available at `http://localhost:3000`.
|
||||
The server will be available at `http://localhost:3000`. Migrations run automatically on startup — no manual step needed.
|
||||
|
||||
### 2b. Run locally
|
||||
|
||||
Requires a running PostgreSQL instance matching your `DATABASE_URL`.
|
||||
|
||||
```bash
|
||||
# Install sqlx-cli if needed
|
||||
cargo install sqlx-cli --no-default-features --features rustls,postgres
|
||||
|
||||
# Run migrations
|
||||
sqlx migrate run
|
||||
|
||||
# Start the server
|
||||
cargo run
|
||||
```
|
||||
|
||||
Migrations are embedded in the binary and run automatically when the server starts.
|
||||
|
||||
## Environment variables
|
||||
|
||||
| Variable | Description | Example |
|
||||
|
||||
Reference in New Issue
Block a user