bigbluebutton-v2.5.11/bbb-learning-dashboard/run-dev.sh

33 lines
807 B
Bash
Raw Normal View History

2023-01-16 14:25:39 +08:00
#!/usr/bin/env bash
cd "$(dirname "$0")"
for var in "$@"
do
if [[ $var == --reset ]] ; then
echo "Performing a full reset..."
rm -rf node_modules
fi
done
if [ ! -d ./node_modules ] ; then
npm install
fi
mkdir -p public/test/test
if [ -e public/test/test/learning_dashboard_data.json ]; then
echo "Json found in public/test/test/learning_dashboard_data.json"
echo ""
tput setaf 2;
echo "To test the Dashboard access:"
echo "http://localhost:3000/learning-analytics-dashboard?meeting=test&report=test"
echo ""
tput sgr0
else
echo "ERROR: Before running, copy a Dashboard data .json from a meeting and save in $(pwd)/public/test/test/learning_dashboard_data.json"
echo "This file can be found in /var/bigbluebutton/learning-dashboard/\$meetingId/"
exit 1
fi
npm start | cat