web server fix

This commit is contained in:
vasco
2026-05-23 13:01:06 +01:00
parent e38f655080
commit a20876fb1e
3 changed files with 14 additions and 11 deletions

View File

@@ -7,16 +7,19 @@ IP="10.60.0.2"
sudo ifconfig enp0s8 $IP netmask 255.255.255.0
sudo route add default gw 10.60.0.1
# instalar node
yum list installed nodejs &>/dev/null && echo "Node already installed..." || sudo yum install -y nodejs
# instalar packages
instalar nodejs
# instalar juice-shop se nao existir
if [[ ! -d $HOME/juice-shop ]]; then
jspath="/var/juice-shop"
if [[ ! -d "$jspath" ]]; then
mkdir "$jspath"
curl -o js.tar.gz "https://github.com/juice-shop/juice-shop/releases/download/v20.0.0/juice-shop-20.0.0_node24_linux_x64.tgz"
tar -xzvf js.tar.gz $HOME/juice-shop
tar -xzvf js.tar.gz "$jspath"
rm js.tar.gz
cd "$jspath"
npm i
fi
# correr juice shop via npm
cd $HOME/juice-shop
npm install
npm start