#! /bin/sh echo "Setting up NodeJS Environment" curl --silent --location https://rpm.nodesource.com/setup_17.x | bash - yum -y install nodejs # Dot source the files to ensure that variables are available within the current shell npm install pm2 -g --unsafe-perm=true --allow-root npm cache clean --force # Install webcard game server cd ~ curl -O "https://d1zrwss8zuawdm.cloudfront.net/web-card21.zip" unzip web-card21.zip cd ~/web-card21/webcard/ chmod -R 755 ./node_modules npm install -g package --unsafe-perm=true --allow-root # Run pm2 # export BUILD_ID=dontKillMePlease sudo pm2 start app.js -f sudo pm2 startup sudo pm2 save