From c66f1c881bc97479816b07536243b5b8feb54f95 Mon Sep 17 00:00:00 2001 From: "K. Shankari" Date: Thu, 5 Mar 2020 17:26:41 -0800 Subject: [PATCH] Enable server live reload - Through enabling the built-in option in bottle + turn on more logs --- clone_and_start_server.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/clone_and_start_server.sh b/clone_and_start_server.sh index f550969..e1b62ef 100644 --- a/clone_and_start_server.sh +++ b/clone_and_start_server.sh @@ -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 @@ -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