diff --git a/README.md b/README.md index 3ecf9faa9..67d890b0b 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ Documentation can be found in `doc/`. ## Things you should know You can debug Etherpad using `bin/debugRun.sh`. +You can run Etherpad quickly launching `bin/fastRun.sh`. It's convenient for developers and advanced users. Be aware that it will skip the dependencies update, so remember to run `bin/installDeps.sh` after installing a new dependency or upgrading version. + If you want to find out how Etherpad's `Easysync` works (the library that makes it really realtime), start with this [PDF](https://github.com/ether/etherpad-lite/raw/master/doc/easysync/easysync-full-description.pdf) (complex, but worth reading). ## Contributing diff --git a/bin/fastRun.sh b/bin/fastRun.sh new file mode 100755 index 000000000..e00bb8c72 --- /dev/null +++ b/bin/fastRun.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# +# Run Etherpad directly, assuming all the dependencies are already installed. +# +# Useful for developers, or users that know what they are doing. If you just +# upgraded Etherpad version, installed a new dependency, or are simply unsure +# of what to do, please execute bin/installDeps.sh once before running this +# script. + +set -eu + +# source: https://stackoverflow.com/questions/59895/how-to-get-the-source-directory-of-a-bash-script-from-within-the-script-itself#246128 +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" + +echo "Running directly, without checking/installing dependencies" + +# move to the base Etherpad directory. This will be necessary until Etherpad +# learns to run from arbitrary CWDs. +cd "${DIR}/.." + +# run Etherpad main class +node "${DIR}/../node_modules/ep_etherpad-lite/node/server.js" "${@}"