-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.sh
More file actions
38 lines (29 loc) · 935 Bytes
/
Copy pathbootstrap.sh
File metadata and controls
38 lines (29 loc) · 935 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# bootstrap.sh — Install dependencies and set up Miden bot on the server
set -euo pipefail
PROJECT_DIR="${1:-$HOME/miden-testnet-bot}"
NODE_PATH="/home/ubuntu/toolchains/node-v22.22.2-linux-arm64/bin"
echo "=== Miden Testnet Bot Bootstrap ==="
echo "Project dir: $PROJECT_DIR"
# Export PATH
export PATH="$NODE_PATH:$PATH"
cd "$PROJECT_DIR"
echo "--- Node version ---"
node --version
npm --version
echo "--- Installing npm dependencies ---"
npm install --legacy-peer-deps
echo "--- Installing Playwright Chromium ---"
npx playwright install chromium || true
echo "--- Creating directories ---"
mkdir -p data/chrome-profile output/screenshots
echo "✅ Bootstrap complete!"
echo ""
echo "To run the bot:"
echo " export PATH=$NODE_PATH:\$PATH"
echo " cd $PROJECT_DIR"
echo " DISPLAY=:99 node bot.js"
echo ""
echo "Or with xvfb:"
echo " Xvfb :99 -screen 0 1366x768x24 &"
echo " DISPLAY=:99 node bot.js"