freeleaps_frontend/start_frontend.sh
2024-09-11 20:56:20 -07:00

21 lines
402 B
Bash
Executable File

#! /bin/sh
DEPLOY_DIR="deploy"
REAL_PATH=$(dirname "$(realpath '$1'))")
pushd $REAL_PATH
if [ -d "$DEPLOY_DIR" ]
then
echo 'detect the existence of deploy folder, skip running the env.sh'
else
source env.sh
fi
export VITE_API_URL='http://127.0.0.1:8002'
export VITE_WEBSOCKET_URL='http://127.0.0.1:8002'
pushd frontend
npm install
npm update
npm run build
npm run format
npm run dev
popd
popd