When using ```npm init serverless-stack@latest my-...
# general
r
When using
Copy code
npm init serverless-stack@latest my-sst-app -- --language typescript
I think it’d be a slight improvement for first time users to create a demo function with the signature
Copy code
export const handler: APIGatewayProxyHandler = async () => {
}
rather than
Copy code
export async function handler(): Promise<APIGatewayProxyResult> {
}
as that lends itself better for new users to understand what the object event. Maybe something like:
Copy code
import { APIGatewayProxyHandler } from "aws-lambda";

export const handler: APIGatewayProxyHandler = async (event) => {
  return {
    statusCode: 200,
    body: `Hello world in account ${event.requestContext.accountId}`,
    headers: { "Content-Type": "text/plain" },
  };
}
r
Checks are failing due to missing labels on the PR but I’m not able to set that so I’ll have to leave that to you
j
Yup I’ll take care of it. Thanks Ross!