Skip to content

Commit

Permalink
Refactor API
Browse files Browse the repository at this point in the history
  • Loading branch information
ruchernchong committed Nov 14, 2023
1 parent 4bc263e commit 0635b57
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sst.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { SSTConfig } from "sst";
import { API } from "./stacks/MyStack";
import { api } from "./stacks/MyStack";

export default {
config(_input) {
Expand All @@ -9,6 +9,6 @@ export default {
};
},
stacks(app) {
app.stack(API);
app.stack(api);
},
} satisfies SSTConfig;
4 changes: 2 additions & 2 deletions stacks/MyStack.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -35,4 +35,4 @@ export function API({ stack }: StackContext) {
stack.addOutputs({
ApiEndpoint: api.url,
});
}
};

0 comments on commit 0635b57

Please sign in to comment.