Server running on port \${port}
27 |PID: \${process.pid}
28 |Started: \${new Date().toISOString()}
29 | 30 | 31 | \`); 32 | }); 33 | 34 | server.listen(port, () => { 35 | // Server started 36 | }); 37 | EOF 38 | 39 | # Start the server in the background 40 | node "$file" & 41 | echo "✅ Started ${name} on port ${port} (PID: $!)" 42 | } 43 | 44 | # Start multiple demo servers 45 | start_server 3000 "React Dev Server" 46 | start_server 3001 "Vue Dev Server" 47 | start_server 4000 "Express API" 48 | start_server 5000 "Next.js App" 49 | start_server 6000 "Nuxt Dashboard" 50 | 51 | echo "" 52 | echo "🎉 Demo servers started!" 53 | echo "Now open the Port Kill Dashboard at http://localhost:3001" 54 | echo "" 55 | echo "To stop all demo servers, run:" 56 | echo "pkill -f 'node server-.*.js'" 57 | echo "" 58 | echo "Or use the dashboard to kill them individually!" 59 | -------------------------------------------------------------------------------- /validate-nix.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Nix Configuration Validation Script 4 | # This script validates the Nix configuration files 5 | 6 | echo "🔍 Validating Nix Configuration" 7 | echo "===============================" 8 | echo "" 9 | 10 | # Check if Nix is available 11 | if ! command -v nix &> /dev/null; then 12 | echo "⚠️ Nix is not installed. Skipping validation." 13 | echo " Install Nix from: https://nixos.org/download.html" 14 | echo "" 15 | echo "📋 Manual validation checklist:" 16 | echo " ✅ flake.nix syntax looks correct" 17 | echo " ✅ shell.nix syntax looks correct" 18 | echo " ✅ GitHub Actions workflow created" 19 | echo " ✅ Documentation created" 20 | echo "" 21 | exit 0 22 | fi 23 | 24 | echo "✅ Nix is available: $(nix --version)" 25 | echo "" 26 | 27 | # Validate flake.nix 28 | echo "🔍 Validating flake.nix..." 29 | if nix flake check . 2>/dev/null; then 30 | echo "✅ flake.nix is valid" 31 | else 32 | echo "❌ flake.nix has issues:" 33 | nix flake check . 2>&1 | head -10 34 | fi 35 | echo "" 36 | 37 | # Show available packages 38 | echo "📦 Available packages:" 39 | nix flake show . 2>/dev/null || echo " (Cannot show packages without Nix)" 40 | echo "" 41 | 42 | # Test development shell 43 | echo "🧪 Testing development shell..." 44 | if nix develop --dry-run . 2>/dev/null; then 45 | echo "✅ Development shell configuration is valid" 46 | else 47 | echo "❌ Development shell has issues" 48 | fi 49 | echo "" 50 | 51 | echo "🎉 Nix configuration validation complete!" 52 | echo "" 53 | echo "📋 Next steps:" 54 | echo " 1. Install Nix: https://nixos.org/download.html" 55 | echo " 2. Enable flakes: echo 'experimental-features = nix-command flakes' >> ~/.config/nix/nix.conf" 56 | echo " 3. Enter development shell: nix develop" 57 | echo " 4. Build: nix build" 58 | echo "" 59 | -------------------------------------------------------------------------------- /run-windows.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM Port Kill - Windows Run Script 3 | REM This script runs the port-kill application on Windows with logging enabled 4 | REM Usage: run-windows.bat [options] 5 | REM Examples: 6 | REM run-windows.bat REM Default: ports 2000-6000 7 | REM run-windows.bat --start-port 3000 REM Ports 3000-6000 8 | REM run-windows.bat --end-port 8080 REM Ports 2000-8080 9 | REM run-windows.bat --ports 3000,8000,8080 REM Specific ports only 10 | REM run-windows.bat --console REM Run in console mode 11 | REM run-windows.bat --verbose REM Enable verbose logging 12 | REM run-windows.bat --docker REM Enable Docker container monitoring 13 | REM run-windows.bat --docker --ports 3000,3001 REM Monitor specific ports with Docker 14 | REM run-windows.bat --show-pid REM Show process IDs in output 15 | REM run-windows.bat --console --show-pid REM Console mode with PIDs shown 16 | 17 | echo 🪟 Starting Port Kill on Windows... 18 | echo 📊 Status bar icon should appear shortly 19 | echo. 20 | 21 | REM Check if we're on Windows 22 | if not "%OS%"=="Windows_NT" ( 23 | echo ⚠️ Warning: This script is designed for Windows systems 24 | echo Current OS: %OS% 25 | echo For macOS, use: ./run.sh 26 | echo For Linux, use: ./run-linux.sh 27 | echo. 28 | ) 29 | 30 | REM Check if the Windows application is built 31 | if not exist ".\target\release\port-kill.exe" ( 32 | echo ❌ Windows application not built. Running Windows build first... 33 | call build-windows.bat 34 | if errorlevel 1 ( 35 | echo ❌ Windows build failed! 36 | exit /b 1 37 | ) 38 | ) 39 | 40 | REM Run the Windows application with logging and pass through all arguments 41 | set RUST_LOG=info 42 | .\target\release\port-kill.exe %* 43 | -------------------------------------------------------------------------------- /run-linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Port Kill - Linux Run Script 4 | # This script runs the port-kill application on Linux with logging enabled 5 | # Usage: ./run-linux.sh [options] 6 | # Examples: 7 | # ./run-linux.sh # Default: ports 2000-6000 8 | # ./run-linux.sh --start-port 3000 # Ports 3000-6000 9 | # ./run-linux.sh --end-port 8080 # Ports 2000-8080 10 | # ./run-linux.sh --ports 3000,8000,8080 # Specific ports only 11 | # ./run-linux.sh --console # Run in console mode 12 | # ./run-linux.sh --verbose # Enable verbose logging 13 | # ./run-linux.sh --docker # Enable Docker container monitoring 14 | # ./run-linux.sh --docker --ports 3000,3001 # Monitor specific ports with Docker 15 | # ./run-linux.sh --show-pid # Show process IDs in output 16 | # ./run-linux.sh --console --show-pid # Console mode with PIDs shown 17 | 18 | echo "🐧 Starting Port Kill on Linux..." 19 | echo "📊 Status bar icon should appear shortly" 20 | echo "" 21 | 22 | # Check if we're on Linux 23 | if [[ "$OSTYPE" != "linux-gnu"* ]]; then 24 | echo "⚠️ Warning: This script is designed for Linux systems" 25 | echo " Current OS: $OSTYPE" 26 | echo " For macOS, use: ./run.sh" 27 | echo "" 28 | fi 29 | 30 | # Check if the Linux application is built 31 | if [ ! -f "./target/release/port-kill" ]; then 32 | echo "❌ Linux application not built. Running Linux build first..." 33 | ./build-linux.sh 34 | if [ $? -ne 0 ]; then 35 | echo "❌ Linux build failed!" 36 | exit 1 37 | fi 38 | fi 39 | 40 | # Run the Linux application with logging and pass through all arguments 41 | echo "🚀 Starting Port Kill..." 42 | echo "📊 If system tray is not available, it will automatically switch to console mode" 43 | echo "" 44 | 45 | RUST_LOG=info ./target/release/port-kill "$@" 46 | -------------------------------------------------------------------------------- /run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Port Kill - Easy Run Script 4 | # This script runs the port-kill application with logging enabled 5 | # Usage: ./run.sh [options] 6 | # Examples: 7 | # ./run.sh # Default: ports 2000-6000 8 | # ./run.sh --start-port 3000 # Ports 3000-6000 9 | # ./run.sh --end-port 8080 # Ports 2000-8080 10 | # ./run.sh --ports 3000,8000,8080 # Specific ports only 11 | # ./run.sh --console # Run in console mode 12 | # ./run.sh --verbose # Enable verbose logging 13 | # ./run.sh --docker # Enable Docker container monitoring 14 | # ./run.sh --docker --ports 3000,3001 # Monitor specific ports with Docker 15 | # ./run.sh --show-pid # Show process IDs in output 16 | # ./run.sh --console --show-pid # Console mode with PIDs shown 17 | 18 | # Check if console mode is requested 19 | CONSOLE_MODE=false 20 | for arg in "$@"; do 21 | if [ "$arg" = "--console" ]; then 22 | CONSOLE_MODE=true 23 | break 24 | fi 25 | done 26 | 27 | if [ "$CONSOLE_MODE" = true ]; then 28 | echo "🚀 Starting Port Kill (Console Mode)..." 29 | echo "📡 Console monitoring started" 30 | echo "" 31 | 32 | # Check if the console application is built 33 | if [ ! -f "./target/release/port-kill-console" ]; then 34 | echo "❌ Console application not built. Running build first..." 35 | cargo build --release 36 | if [ $? -ne 0 ]; then 37 | echo "❌ Build failed!" 38 | exit 1 39 | fi 40 | fi 41 | 42 | # Run the console application 43 | RUST_LOG=info ./target/release/port-kill-console "$@" 44 | else 45 | echo "🚀 Starting Port Kill..." 46 | echo "📊 Status bar icon should appear shortly" 47 | echo "" 48 | 49 | # Check if the application is built 50 | if [ ! -f "./target/release/port-kill" ]; then 51 | echo "❌ Application not built. Running build first..." 52 | cargo build --release 53 | if [ $? -ne 0 ]; then 54 | echo "❌ Build failed!" 55 | exit 1 56 | fi 57 | fi 58 | 59 | # Run the GUI application 60 | RUST_LOG=info ./target/release/port-kill "$@" 61 | fi 62 | -------------------------------------------------------------------------------- /dashboard/components/StatsCard.vue: -------------------------------------------------------------------------------- 1 | 2 |15 | {{ title }} 16 |
17 |19 | {{ value }} 20 |
21 |25 | {{ change > 0 ? '+' : '' }}{{ change }} 26 |
27 |