728x90
반응형
import 하는 방법
import {Coffee, ICoffee} from "../domain/coffee";
-------------------------------------------------------------------------------------
export 하는 방법
export interface ICoffee {
id: string;
name: string;
bean: string;
team_name: string; //추가
}
export class Coffee {
private PK: string; // partition key
id: string;
name: string;
bean: string;
team_name: string; //추가
constructor(coffee: ICoffee) {
this.PK = coffee.id;
this.id = coffee.id;
this.name = coffee.name;
this.bean = coffee.bean;
this.team_name = coffee.team_name; //추가
}
}
-------------------------------------------------------------------------------------
export { uuid }
-------------------------------------------------------------------------------------
export const lambdaHandler = async (event: APIGatewayProxyEvent): Promise<APIGatewayProxyResult> => {
return await RouteRule.create(event)
// .add(new TeamController())
// .add(new PlayerController())
.add(new CoffeeController()).route();
};
728x90
반응형
'⭐ JAVASCRIPT' 카테고리의 다른 글
javascript - class - constructor (0) | 2021.07.20 |
---|---|
javascript - 비교연산자 Boolean (0) | 2021.07.19 |
javascript - 버튼클릭 속성을 부여하고 바탕화면 색깔변경 (0) | 2021.07.19 |
javascript 기초 - 문자열과 숫자열 - 타입 (0) | 2021.07.18 |
javascript, html 기초 input 태그 (0) | 2021.07.18 |