Website/run.sh

17 lines
337 B
Bash
Raw Normal View History

2024-08-14 12:18:58 +00:00
#!/bin/bash
2024-08-14 10:43:07 +00:00
2024-08-14 12:18:58 +00:00
# Default values
PORT=8080
2024-08-14 10:43:07 +00:00
2024-08-14 12:18:58 +00:00
# Parse command-line arguments
while [[ "$#" -gt 0 ]]; do
case $1 in
-p|--port) PORT="$2"; shift ;;
*) echo "Unknown parameter passed: $1"; exit 1 ;;
esac
shift
done
# Run the Go application with the parsed flags
go run discord.go rss.go telegram.go main.go -p=$PORT