Update gitignore
This commit is contained in:
commit
9e0ddb8182
32 changed files with 3863 additions and 0 deletions
31
deploy.sh
Executable file
31
deploy.sh
Executable file
|
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
echo "==> Checking Node.js..."
|
||||
node_version=$(node -v 2>/dev/null | cut -c2- | cut -d. -f1)
|
||||
if [ -z "$node_version" ] || [ "$node_version" -lt 18 ]; then
|
||||
echo "ERROR: Node.js 18+ required. Install via: https://nodejs.org"
|
||||
exit 1
|
||||
fi
|
||||
echo " Node $(node -v) OK"
|
||||
|
||||
echo "==> Installing dependencies..."
|
||||
npm install --production
|
||||
|
||||
echo "==> Checking .env..."
|
||||
if [ ! -f .env ]; then
|
||||
echo "ERROR: .env not found. Copy .env.example and fill in your values."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for var in TWITCH_CLIENT_ID TWITCH_CLIENT_SECRET SECRET_KEY APP_BASE_URL; do
|
||||
val=$(grep "^${var}=" .env | cut -d= -f2-)
|
||||
if [ -z "$val" ] || echo "$val" | grep -q "your_\|change_this"; then
|
||||
echo "ERROR: $var is not set in .env"
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
echo " .env OK"
|
||||
|
||||
echo "==> Starting HeyStreamer..."
|
||||
node src/server.js
|
||||
Loading…
Add table
Add a link
Reference in a new issue