Hey!, How was the stack being formed? I remember r...
# help
ö
Hey!, How was the stack being formed? I remember reading it somewhere, but can’t find it.
sst.json
Copy code
{
  "name": "someName",
  "region": "us-east-1",
  "main": "stacks/index.ts"
}
stacks/index.ts
Copy code
import * as sst from "@serverless-stack/resources";
import { MainStack } from "./MainStack";

export default function main(app: <http://sst.App|sst.App>): void {
      // Set default runtime for all functions
      app.setDefaultFunctionProps({
            runtime: "nodejs14.x"
      });

      new MainStack(app, "someOtherName");
}
t
I believe we concat
appname-stackname-stage
ö
stackname
is the second parameter to the new MainStack(app, ‘’) right?
t
That's right, assuming you're calling
super(app, name)
in the constructor
ö
Which we have to, dont we uh
t
yeah, for my own stacks I don't pass anything in, I set the name inside the constructor. Eg:
Copy code
class MyStack(app) {
  super(app, "my-stack")
}
Unless you're spinning up multiple instances of the same stack I didn't see a good reason to allow that to be settable externally