diff --git a/sst.config.ts b/sst.config.ts index 78a0e7e..aa773b2 100644 --- a/sst.config.ts +++ b/sst.config.ts @@ -1,5 +1,5 @@ import { SSTConfig } from "sst"; -import { API } from "./stacks/MyStack"; +import { api } from "./stacks/MyStack"; export default { config(_input) { @@ -9,6 +9,6 @@ export default { }; }, stacks(app) { - app.stack(API); + app.stack(api); }, } satisfies SSTConfig; diff --git a/stacks/MyStack.ts b/stacks/MyStack.ts index fdd271a..349b3f0 100644 --- a/stacks/MyStack.ts +++ b/stacks/MyStack.ts @@ -1,6 +1,6 @@ import { StackContext, Api, EventBus } from "sst/constructs"; -export function API({ stack }: StackContext) { +export const api = ({ stack }: StackContext) => { const bus = new EventBus(stack, "bus", { defaults: { retries: 10, @@ -35,4 +35,4 @@ export function API({ stack }: StackContext) { stack.addOutputs({ ApiEndpoint: api.url, }); -} +};