@@ -255,25 +255,31 @@ check-env-dev:
255255# help: run - Execute helper script ./run.sh
256256
257257.PHONY : serve serve-ssl serve-granian serve-granian-ssl serve-granian-http2 dev dev-remote stop stop-dev stop-serve run \
258- certs certs-jwt certs-jwt-ecdsa certs-all certs-mcp-ca certs-mcp-gateway certs-mcp-plugin certs-mcp-all certs-mcp-check
258+ certs certs-jwt certs-jwt-ecdsa certs-all certs-mcp-ca certs-mcp-gateway certs-mcp-plugin certs-mcp-all certs-mcp-check \
259+ js-build
260+
261+ # # --- JS build ----------------------------------------------------------------
262+ js-build : # # Install npm dependencies and build JS bundle with Vite
263+ npm install
264+ npm run vite:build
259265
260266# # --- Primary servers ---------------------------------------------------------
261- serve : # # Run production server with Gunicorn + Uvicorn (default)
267+ serve : js-build # # Run production server with Gunicorn + Uvicorn (default)
262268 ./run-gunicorn.sh
263269
264- serve-ssl : certs # # Run Gunicorn with TLS enabled
270+ serve-ssl : js-build certs # # Run Gunicorn with TLS enabled
265271 SSL=true CERT_FILE=certs/cert.pem KEY_FILE=certs/key.pem ./run-gunicorn.sh
266272
267- serve-granian : # # Run production server with Granian (Rust-based, alternative)
273+ serve-granian : js-build # # Run production server with Granian (Rust-based, alternative)
268274 ./run-granian.sh
269275
270- serve-granian-ssl : certs # # Run Granian with TLS enabled
276+ serve-granian-ssl : js-build certs # # Run Granian with TLS enabled
271277 SSL=true CERT_FILE=certs/cert.pem KEY_FILE=certs/key.pem ./run-granian.sh
272278
273- serve-granian-http2 : certs # # Run Granian with HTTP/2 and TLS
279+ serve-granian-http2 : js-build certs # # Run Granian with HTTP/2 and TLS
274280 SSL=true GRANIAN_HTTP=2 CERT_FILE=certs/cert.pem KEY_FILE=certs/key.pem ./run-granian.sh
275281
276- dev :
282+ dev : js-build
277283 @TEMPLATES_AUTO_RELOAD=true $(VENV_DIR ) /bin/uvicorn mcpgateway.main:app --host 0.0.0.0 --port 8000 --reload --reload-exclude=' public/'
278284
279285.PHONY : dev-echo
@@ -284,7 +290,7 @@ dev-echo: ## Run dev server with SQL query logging enable
284290
285291dev-remote : DEBUG_IP = 127.0.0.1
286292dev-remote : DEBUG_WAIT = --wait-for-client
287- dev-remote : # # Run dev server with remote debugging (debugpy on port 5678, remote: make dev-remote DEBUG_IP=0.0.0.0 DEBUG_WAIT=)
293+ dev-remote : js-build # # Run dev server with remote debugging (debugpy on port 5678, remote: make dev-remote DEBUG_IP=0.0.0.0 DEBUG_WAIT=)
288294 @TEMPLATES_AUTO_RELOAD=true $(VENV_DIR ) /bin/python -m debugpy \
289295 --listen $(DEBUG_IP ) :5678 \
290296 $(DEBUG_WAIT ) \
@@ -306,7 +312,7 @@ stop-serve: ## Stop gunicorn production server (port 4444)
306312 @if [ -f /tmp/mcpgateway-gunicorn.lock ]; then kill -9 $$(cat /tmp/mcpgateway-gunicorn.lock ) 2> /dev/null || true ; rm -f /tmp/mcpgateway-gunicorn.lock; fi
307313 @lsof -ti:4444 2> /dev/null | xargs -r kill -9 || true
308314
309- run :
315+ run : js-build
310316 ./run.sh
311317
312318# # --- Certificate helper ------------------------------------------------------
0 commit comments