I don't have any NodeRed specific sample. But almost every action that you can trigger via your browser uses an underlying Rest command. You can perform these rest commands from any platform that you want including NodeRed.
Take a look at the Using REST API of ctrlX CORE blog post for some inspirations.
currently the api for start, stop and restart of an app is not official supported. What you can do is enable and disable a snap using package-manager api an example in Node-RED would be: https://flows.nodered.org/flow/91f8147e8b72daf7d459b8f626e31090
You need to update the inject nodes accordingly to your environment.