-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile.dev
More file actions
29 lines (22 loc) · 910 Bytes
/
Makefile.dev
File metadata and controls
29 lines (22 loc) · 910 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.PHONY: dev dev-down run prod-run run-watch dev-run dev-help
dev-help:
@echo "🛠️ Development Commands"
@echo "========================"
@echo " make dev - Start development environment"
@echo " make dev-down - Stop development environment"
@echo " make run - Run application with cargo (PORT to override)"
@echo " make prod-run - Run app with production config (PROD_PORT/PORT)"
@echo " make run-watch - Run with cargo watch (PORT to override)"
# Development environment
dev:
./docker.sh dev
dev-down:
./docker.sh dev-down
run-watch:
PORT=$(PORT) cargo watch -d 5 -w src -w static -w templates -w Cargo.toml -w resources --why -x run
dev-run:
PORT=$(PORT) cargo watch -d 5 -w src -w static -w templates -w Cargo.toml -w resources --why -x run
run:
PORT=$(PORT) cargo run
prod-run:
CONFIG_PATH=config/config.prod.toml PORT=$${PROD_PORT:-$(PORT)} cargo run