BLOG-43 docs: readme document for backend start
This commit is contained in:
parent
e72f5a5a8e
commit
2922d52416
42
backend/README.md
Normal file
42
backend/README.md
Normal file
@ -0,0 +1,42 @@
|
||||
# Backend
|
||||
|
||||
## Development
|
||||
|
||||
### SQL Migration
|
||||
|
||||
1. Install sqlx
|
||||
|
||||
```bash
|
||||
cargo install sqlx-cli
|
||||
```
|
||||
|
||||
2. Run migration
|
||||
|
||||
```bash
|
||||
sqlx migrate run
|
||||
```
|
||||
|
||||
### Run Project
|
||||
|
||||
1. Prepare for sql schema setup
|
||||
|
||||
```bash
|
||||
cargo sqlx prepare --workspace
|
||||
```
|
||||
|
||||
2. Run the server
|
||||
|
||||
```bash
|
||||
RUST_LOG=debug cargo run
|
||||
```
|
||||
|
||||
3. (Optional) Hot restart
|
||||
|
||||
1. Install `watchexec`
|
||||
|
||||
2. Run the server with `watchexec`
|
||||
|
||||
```bash
|
||||
RUST_LOG=debug watchexec -e rs -r 'cargo run'
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user