What is the recommend way to only have some of you...
# sst
j
What is the recommend way to only have some of your stacks in dev (websocket) mode for development? We have quite a few stacks (around 12) but only really interested in running 1 or 2 in debug at any one time?
We also make use of Sharing APIs across stacks, where I would want to deploy the main stack but only 1 of the sub stacks
t
You can conditionally initialize stacks in your app
Copy code
if (!app.local) {
  new NonLocalStack()
}
app.local == true for
sst start
j
OK that is what I am kinda doing, but was not sure if that was the best approach. 👍
a
Oh didn’t know about app.local.
j
would it be somehow possible to force some functions to NOT changed into debug mode. With the CUSTOM defaultAuthorizer sitting in the parent main stack if I then debug a child stack (leaving the rest of the children "deployed" then as the Authorizer lambda for all of them is in parent it the causes every request needing auth to hit my local machine regardless of stack. Obviously I could just have no defaultAuthorizer but that feels rubbish! @thdxr
t
Yeah afk right now but search docs for liveDebug
It's a boolean to turn it off
j