diff --git a/src/bin/cleanRun.sh b/src/bin/cleanRun.sh index 556180eb4..adac8c662 100755 --- a/src/bin/cleanRun.sh +++ b/src/bin/cleanRun.sh @@ -35,5 +35,5 @@ src/bin/installDeps.sh "$@" || exit 1 #Move to the node folder and start echo "Starting Etherpad..." - -exec node src/node/server.js "$@" +cd src +exec node --import tsx ./node/server.ts "$@" diff --git a/src/bin/deb-src/sysroot/etc/init/etherpad.conf b/src/bin/deb-src/sysroot/etc/init/etherpad.conf index 0d017df1e..9a2fcf42f 100644 --- a/src/bin/deb-src/sysroot/etc/init/etherpad.conf +++ b/src/bin/deb-src/sysroot/etc/init/etherpad.conf @@ -20,7 +20,7 @@ end script script cd $EPHOME/ - exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node src/node/server.ts \ + exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node --import tsx src/node/server.ts \ >> $EPLOGS/access.log \ 2>> $EPLOGS/error.log echo "Etherpad is running on http://localhost:9001 - To change settings edit /opt/etherpad/settings.json" diff --git a/src/bin/debugRun.sh b/src/bin/debugRun.sh index 2fae42eee..1336e295a 100755 --- a/src/bin/debugRun.sh +++ b/src/bin/debugRun.sh @@ -14,6 +14,7 @@ echo "If you are new to debugging Node.js with Chrome DevTools, take a look at t echo "https://medium.com/@paul_irish/debugging-node-js-nightlies-with-chrome-devtools-7c4a1b95ae27" echo "Open 'chrome://inspect' on Chrome to start debugging." +cd src # Use 0.0.0.0 to allow external connections to the debugger # (ex: running Etherpad on a docker container). Use default port # (9229) -exec node --inspect=0.0.0.0:9229 src/node/server.js "$@" +exec node --import tsx --inspect=0.0.0.0:9229 ./node/server.ts "$@" diff --git a/src/bin/fastRun.sh b/src/bin/fastRun.sh index b2703316b..6b4996175 100755 --- a/src/bin/fastRun.sh +++ b/src/bin/fastRun.sh @@ -19,4 +19,4 @@ cd "${MY_DIR}/../.." || exit 1 echo "Running directly, without checking/installing dependencies" # run Etherpad main class -exec node src/node/server.js "$@" +exec node --import tsx src/node/server.ts "$@" diff --git a/src/bin/run.sh b/src/bin/run.sh index 235105a02..463e5936d 100755 --- a/src/bin/run.sh +++ b/src/bin/run.sh @@ -32,4 +32,4 @@ src/bin/installDeps.sh "$@" || exit 1 # Move to the node folder and start log "Starting Etherpad..." -exec npm run dev --prefix ./src "$@" +exec pnpm run dev --prefix ./src "$@"