You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
807 B

#!/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