All checks were successful
Frontend CI / build (push) Successful in 1m4s
### Description - Add some endpoints about image: - POST `/image/upload` - GET `/image/{id}` > [!NOTE] > Since there isn't identity authentication, the `/image` endpoints should be restricted to private network in nginx. > [!NOTE] > Volume for backend should be configured in `pod.yaml`. ### Package Changes ```toml actix-multipart = "0.7.2" ``` ### Screenshots _No response_ ### Reference Resolves #78 ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #84 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
42 lines
503 B
Markdown
42 lines
503 B
Markdown
# 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'
|
|
```
|