Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Rcomian/7c8fa0c3190d65c598a5848182da33f1 to your computer and use it in GitHub Desktop.
Save Rcomian/7c8fa0c3190d65c598a5848182da33f1 to your computer and use it in GitHub Desktop.
%~d0
cd %~d0%~p0
call npm init
call npm install --save node-red
call npm install --save @autocodingsystems/node-red-utils
call npm install --save node-red-contrib-mqtt-broker
call npm install --save node-red-dashboard
call npm install --save winser
mkdir datadir
@echo off
(
echo %%~d0
echo cd %%~d0%%~p0
echo .\node_modules\.bin\node-red -u ./datadir ./datadir/flows.json
)>run-local.cmd
(
echo %%~d0
echo cd %%~d0%%~p0
echo call .\node_modules\.bin\winser -i -a --startuptype delayed --startcmd "node .\node_modules\node-red\red.js -u ./datadir ./datadir/flows.json"
echo pause
)>install-service.cmd
(
echo %%~d0
echo cd %%~d0%%~p0
echo call .\node_modules\.bin\winser -r -x
echo pause
)>uninstall-service.cmd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment