I need to create an ssh tunnel to connect to my database, so the logical point would be to add the shell command in package.json under scripts/prestart.
However, as it seems, slc run
does not execute this script, npm start
does, but of course doesn't run the loopback module.
I could think of a few workarounds such as writing a startup script that both creates the ssh tunnel and calls slc run
, or running slc run
in package.json scripts/start, but all these workarounds stink.
Is there a better way to do this?