From 75494950f5785ad5d59050f9a658bcd78926dc45 Mon Sep 17 00:00:00 2001 From: Lukas Riedersberger Date: Tue, 2 Jan 2024 18:18:30 +0100 Subject: [PATCH] Fix running npm package forever in chapter 4 On some systems the path to the binary of the npm package 'forever' might not be `/usr/local/bin/forever`. Fixed by instead using `npx` to run it. --- chapter4.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/chapter4.txt b/chapter4.txt index 95bb1a6..4ef5cdc 100644 --- a/chapter4.txt +++ b/chapter4.txt @@ -393,12 +393,12 @@ We'll now use `forever` (which we installed earlier) to start the app. {lang="yaml",starting-line-number=41} ``` - name: Check list of running Node.js apps. - command: /usr/local/bin/forever list + command: npx forever list register: forever_list changed_when: false - name: Start example Node.js app. - command: "/usr/local/bin/forever start {{ node_apps_location }}/app/app.js" + command: "npx forever start {{ node_apps_location }}/app/app.js" when: "forever_list.stdout.find(node_apps_location + \ '/app/app.js') == -1" ```