Is there a way to have a task run together with the dev command whenever I type ntl dev
? The case I have is that I want to make my functions in dev accessible from outside (Sanity CMS in this case). For this I’m using localtunnel which I can invoke on default port 8888 by running: lt --port 8888 --subdomain <my-fixed-subdomain>
.
I don’t want to run this command separately however every time I run ntl dev. I tried adding concurrently inside the dev npm script part of my package.json as per below. This doesn’t work unfortunately. The outside tunnel is established but the ntl-ci dev server then never starts.
scripts: {
...
dev: "concurrently \"lt --port 8888 -- subdomain <my-fixed-subdomain>\""
}
I’m aware that netlify cli can be started in a live session, but this doesn’t provide me with a fixed subdomain so I constantly need to update the webhook address inside the Sanity CMS admin interface.