ChoruYt's picture
Upload 216 files
a7f51f5 verified
Raw
History Blame Contribute Delete
603 Bytes
#!/bin/bash
set -e
echo "[Exocore] Checking Node.js runtime..."
if ! which node > /dev/null 2>&1; then
echo "[Exocore] Node.js not found. Installing via nix-env..."
nix-env -iA nixpkgs.nodejs_20 2>/dev/null || nix-env -iA nixpkgs.nodejs 2>/dev/null || true
fi
NODE_PATH=$(which node 2>/dev/null || echo "")
if [ -z "$NODE_PATH" ]; then echo "[Exocore] ERROR: Node.js could not be installed." && exit 1; fi
echo "[Exocore] Node.js detected: $(node --version)"
if [ -f package.json ]; then
echo "[Exocore] Installing npm dependencies..."
npm install
fi
echo "[Exocore] Done! Run: node index.js"