Skip to content

Commit

Permalink
fix: lambda handler 함수로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
leemhoon00 committed Nov 17, 2024
1 parent 132ed1a commit b785809
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
7 changes: 3 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -18,6 +19,4 @@ async function main() {
courseService.saveAllCourse(),
specialCourseService.saveAllCourse(),
]);
}

main();
};

0 comments on commit b785809

Please sign in to comment.