chore: local dev scripts
Signed-off-by: Dmytro Stanchiev <git@dmytros.dev>
This commit is contained in:
25
scripts/start.sh
Executable file
25
scripts/start.sh
Executable file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Trap SIGTERM and SIGINT for graceful shutdown
|
||||
trap 'echo "Received shutdown signal, stopping services..."; kill -TERM $API_PID $MCP_PID 2>/dev/null; wait' TERM INT
|
||||
|
||||
# Start API Server in background
|
||||
echo "Starting API Server on port ${API_PORT:-4005}..."
|
||||
bun ../dist/api/index.js &
|
||||
API_PID=$!
|
||||
|
||||
# Give API server a moment to initialize
|
||||
sleep 1
|
||||
|
||||
# Start MCP Server in background
|
||||
echo "Starting MCP Server on port ${API_PORT:-4006}..."
|
||||
bun ../dist/mcp/index.js &
|
||||
MCP_PID=$!
|
||||
|
||||
echo "Both services started successfully"
|
||||
echo "API Server PID: $API_PID"
|
||||
echo "MCP Server PID: $MCP_PID"
|
||||
|
||||
# Wait for both processes
|
||||
wait $API_PID $MCP_PID
|
||||
Reference in New Issue
Block a user