From b785809a9e474e0c08572e93c0516a35400176b6 Mon Sep 17 00:00:00 2001 From: leemhoon00 Date: Sun, 17 Nov 2024 19:54:27 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20lambda=20handler=20=ED=95=A8=EC=88=98?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/index.ts | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 22f1b2d..39a83d9 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "license": "ISC", "description": "", "devDependencies": { + "@types/aws-lambda": "^8.10.145", "@types/dotenv": "^6.1.1", "ts-node": "^10.9.2", "typescript": "^5.6.3" diff --git a/src/index.ts b/src/index.ts index 253c4b7..a193346 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,10 +3,11 @@ import { PrismaClient } from '@prisma/client'; import { FacilityService } from './facility/facility.service'; import { CourseService } from './course/course.service'; import { SpecialCourseService } from './course/special-course.service'; +import { Handler } from 'aws-lambda'; dotenv.config(); -async function main() { +export const handler: Handler = async () => { const prisma = new PrismaClient(); const facilityService = new FacilityService(prisma); @@ -18,6 +19,4 @@ async function main() { courseService.saveAllCourse(), specialCourseService.saveAllCourse(), ]); -} - -main(); +};