Sandstorm security model restricts outgoing and incoming connections. A hack exists to proxy connections, but the 'powerbox' feature will soon enable applications to selectively request the user authorization to perform such connections.
In the described setup this is not implemented. Therefore, only Node-RED interactions without a network are possible.
Prepare the environment by following the instructions: https://docs.sandstorm.io/en/latest/vagrant-spk/packaging-tutorial/
git clone https://github.com/node-red/node-red.git
cd node-red
vagrant-spk setupvm node
vagrant-spk vm up
vagrant-spk init
Replace the last line in .sandstorm/launcher.sh with:
node red.js --port 8080 -u /var
Modify .sandstorm/sandstorm-pkgdef.capnp:
argv = ["/sandstorm-http-bridge", "8080", "--", "/opt/app/.sandstorm/launcher.sh"]
Change app description, etc in .sandstorm/sandstorm-pkgdef.capnp
Test using:
vagrant-spk dev
And then browse: http://local.sandstorm.io:6080/
Package it:
vagrant-spk pack nodered.spk