feat: add stop command to Makefile for terminating local servers
This commit is contained in:
9
Makefile
9
Makefile
@@ -1,12 +1,13 @@
|
|||||||
# zhealth Makefile
|
# zhealth Makefile
|
||||||
# Run `make help` to see available commands
|
# Run `make help` to see available commands
|
||||||
|
|
||||||
.PHONY: help build release lint typecheck test clean serve
|
.PHONY: help build release lint typecheck test clean serve stop
|
||||||
|
|
||||||
# Default target
|
# Default target
|
||||||
help:
|
help:
|
||||||
@echo "Available commands:"
|
@echo "Available commands:"
|
||||||
@echo " make serve - Start both backend and frontend servers"
|
@echo " make serve - Start both backend and frontend servers"
|
||||||
|
@echo " make stop - Stop running backend and frontend servers"
|
||||||
@echo " make build - Build for development"
|
@echo " make build - Build for development"
|
||||||
@echo " make release - Build optimized production bundle"
|
@echo " make release - Build optimized production bundle"
|
||||||
@echo " make migrate - Run database migrations"
|
@echo " make migrate - Run database migrations"
|
||||||
@@ -16,6 +17,12 @@ help:
|
|||||||
@echo " make test - Run all tests"
|
@echo " make test - Run all tests"
|
||||||
@echo " make clean - Clean build artifacts"
|
@echo " make clean - Clean build artifacts"
|
||||||
|
|
||||||
|
stop:
|
||||||
|
@echo "Stopping backend (port 3000) and frontend (port 5173)..."
|
||||||
|
-@lsof -ti :3000 | xargs -r kill 2>/dev/null || true
|
||||||
|
-@lsof -ti :5173 | xargs -r kill 2>/dev/null || true
|
||||||
|
@echo "Servers stopped"
|
||||||
|
|
||||||
# Backend commands
|
# Backend commands
|
||||||
.PHONY: backend-dev backend-build backend-release backend-lint backend-test migrate seed
|
.PHONY: backend-dev backend-build backend-release backend-lint backend-test migrate seed
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user