David Martin
07/19/2021, 7:40 PMFrank
const dbStack = new DBStack(app, "database");
new ApiStack(app, "api", { myTable: dbStack.myTable });
SST will deploy the DBStack
, then the ApiStack
Frank
David Martin
07/19/2021, 7:55 PMLukasz K
08/09/2021, 6:45 AMthis.addOutputs(...)
) and reference them in the second.. how exactly? 🙂 I tried using what you've shown above (dbStack.myTable
) on one of my props but IDE's cringing due to params not being assignable to StackProps typeFrank
Frank
StackProps
type. It’s fairly straight forward, here’s an example of referencing the api
construct across stack https://docs.serverless-stack.com/constructs/Api#sharing-an-api-across-stacksFrank
TypeScript
tab on the code sample.Frank
Lukasz K
08/09/2021, 7:21 AM