mirror of
https://github.com/bybrooklyn/alchemist.git
synced 2026-04-18 01:43:34 -04:00
Make just dev build Astro before starting the backend
This commit is contained in:
@@ -14,7 +14,7 @@ All common tasks are in the `justfile` — use `just` as the task runner.
|
||||
|
||||
### Development
|
||||
```bash
|
||||
just dev # Backend (watch) + frontend dev server concurrently
|
||||
just dev # Build frontend assets, then start the backend
|
||||
just run # Backend only
|
||||
just web # Frontend dev server only
|
||||
```
|
||||
|
||||
@@ -33,7 +33,7 @@ Alchemist is an automated media library optimization tool written in Rust. It mo
|
||||
The project uses `just` to simplify common tasks.
|
||||
|
||||
### Development
|
||||
- `just dev`: Starts both the backend (watch mode) and frontend dev server.
|
||||
- `just dev`: Builds the frontend assets, then starts the backend.
|
||||
- `just run`: Runs the Rust backend directly.
|
||||
- `just web`: Starts the frontend development server only.
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ frontend tooling.
|
||||
```bash
|
||||
git clone https://github.com/bybrooklyn/alchemist.git
|
||||
cd alchemist
|
||||
just dev # backend watch mode + frontend dev server
|
||||
just dev # build frontend assets, then start the backend
|
||||
```
|
||||
|
||||
## Common tasks
|
||||
|
||||
12
justfile
12
justfile
@@ -23,15 +23,9 @@ default:
|
||||
# DEVELOPMENT
|
||||
# ─────────────────────────────────────────
|
||||
|
||||
# Start backend (watch mode) + frontend dev server concurrently
|
||||
dev:
|
||||
@echo "Starting Alchemist dev servers..."
|
||||
@trap 'kill 0' INT EXIT; \
|
||||
(cd web && bun run dev) & WEB_PID=$!; \
|
||||
cargo watch -x run & RUST_PID=$!; \
|
||||
wait -n 2>/dev/null || true; \
|
||||
kill $WEB_PID $RUST_PID 2>/dev/null; \
|
||||
wait
|
||||
# Build frontend assets, then start the backend server
|
||||
dev: web-build
|
||||
@just run
|
||||
|
||||
# Start the backend only
|
||||
run:
|
||||
|
||||
@@ -21,7 +21,20 @@ To work on Alchemist, you'll need:
|
||||
|
||||
## Local Development
|
||||
|
||||
### 1. Back-end (Rust)
|
||||
### 1. Full stack with `just`
|
||||
|
||||
```bash
|
||||
# Clone the repository
|
||||
git clone https://github.com/bybrooklyn/alchemist.git
|
||||
cd alchemist
|
||||
|
||||
# Build the frontend and start the backend
|
||||
just dev
|
||||
```
|
||||
|
||||
`just dev` builds the Astro site into `web/dist` and then starts the Rust server.
|
||||
|
||||
### 2. Back-end (Rust)
|
||||
The back-end handles the database, scanning files, and running FFmpeg.
|
||||
|
||||
```bash
|
||||
@@ -36,7 +49,7 @@ cargo build
|
||||
cargo run
|
||||
```
|
||||
|
||||
### 2. Front-end (Web UI)
|
||||
### 3. Front-end (Web UI)
|
||||
The web interface is located in the `web/` directory.
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user