Louis Barclay
07/20/2021, 4:59 PMthdxr
07/20/2021, 5:04 PMLouis Barclay
07/20/2021, 5:07 PMthdxr
07/20/2021, 5:15 PMthdxr
07/20/2021, 5:15 PMFrank
Edge
stack roughly look like? I think we can add a setDefaultFunctionProps
on the Stack
object.Frank
Louis Barclay
07/20/2021, 6:09 PMLouis Barclay
07/20/2021, 6:09 PMimport * as sst from "@serverless-stack/resources";
export default class Edge extends sst.Stack {
constructor(scope, id, props) {
super(scope, id, props);
// Create a HTTP API
const api = new sst.Api(this, "Api", {
defaultFunctionProps: {
timeout: 20,
},
routes: {
"POST /create": "src/edge/create.main",
},
});
// Show the endpoint in the output
this.addOutputs({
ApiEndpoint: api.url,
});
}
}
Louis Barclay
07/20/2021, 6:10 PM