-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (39 loc) · 1.18 KB
/
Makefile
File metadata and controls
48 lines (39 loc) · 1.18 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# NodeGaze Makefile
.PHONY: help setup createdb migrate prepare run clean reset dev
# Default target
help:
@echo "Available targets:"
@echo " setup - Complete project setup (createdb + migrate + prepare)"
@echo " createdb - Create the database"
@echo " migrate - Run database migrations"
@echo " prepare - Generate offline query data for SQLx"
@echo " run - Run the application"
@echo " dev - Setup and run the application"
@echo " reset - Reset the database (drop and recreate)"
@echo " clean - Clean build artifacts"
# Complete setup process
setup: reset createdb migrate
@echo "Setup complete! Ready to run the application."
# Create the database
createdb:
@echo "Creating database..."
sqlx database create
# Run database migrations
migrate:
@echo "Running database migrations..."
sqlx migrate run --source backend/migrations
# Run the application
run:
@echo "Starting NodeGaze..."
cargo run
# Development workflow: setup then run
dev: setup run
# Reset database (drop and recreate)
reset:
@echo "Resetting database..."
sqlx database drop
sqlx database create
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
cargo clean