Skip to content

Commit

Permalink
Enable server live reload
Browse files Browse the repository at this point in the history
- Through enabling the built-in option in bottle
+ turn on more logs
  • Loading branch information
shankari committed Mar 6, 2020
1 parent b0ac969 commit c66f1c8
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion clone_and_start_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ echo "Cloning from repo "${SERVER_REPO}" and branch "$SERVER_BRANCH
mkdir -p /src
cd /src
git clone $SERVER_REPO
echo "Finished cloning from repo "${SERVER_REPO}" and branch "$SERVER_BRANCH
cd e-mission-server
git clone https://github.com/driftyco/ionic-package-hooks.git ./package-hooks
git fetch origin $SERVER_BRANCH
git checkout -f $SERVER_BRANCH

echo "About to start conda update, this may take some time..."
conda env update --name emission --file setup/environment36.yml
conda clean -t
conda clean -p
Expand Down Expand Up @@ -36,6 +37,16 @@ else
fi
cat conf/net/api/webserver.conf

if [ -z ${LIVERELOAD_SRC}} ] ; then
echo "Live reload disabled, "
else
echo "Enabling bottle live reload"
ORIG="run.host=server_host"
NEW="run(reloader=True,host=server_host"
echo "Replacing $ORIG -> $NEW"
sed -i -e "s|$ORIG|$NEW|g" /src/e-mission-server/emission/net/api/cfc_webapp.py
fi

source activate emission

# launch the webapp
Expand Down

0 comments on commit c66f1c8

Please sign in to comment.