#!/bin/bash # Set terminal title (wird von vielen Terminal-Emulatoren unterstützt) echo -ne "\033]0;NodeJS WebSocket Test Server\007" # Get run mode read -p "Enter mode (custom / twitch) [default: custom]: " mode mode=${mode:-custom} # Get target information read -p "Enter target (custom url / twitch channel): " target # Falls target leer ist und der Modus custom ist, nimm die Default-URL if [ -z "$target" ]; then if [ "$mode" == "custom" ]; then target="wss://echo.websocket.org" fi fi # Execute the script with given information node index.js "$mode" "$target"