-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix: sync-upstream yml * Fix: optional delete * Fix: sync-upstream yml fork url * Fix: sync-upstream yml 2차 수정 * Fix: sync-upstream yml 3차 수정 * Update README.md * Update README.md * Fix: sync-upstream dependa-bot * Fix: installing gh cli * Update README.md test 중 * Fix: sync-form yaml * Fix: sync-form yaml2 * Fix: sync-form yaml3 * Fix: sync-form yaml4 * Fix: fork yaml 파일 (#33) * Fix: sync-form yaml * Fix: sync-form yaml2 * Fix: sync-form yaml3 * Fix: sync-form yaml4 --------- Co-authored-by: minchodang <[email protected]> * Update README.md * Update README.md 테스트 용 * Fix: sync-form yaml final (#3) (#35) Co-authored-by: minchodang <[email protected]> * Update README.md * remove: sync yaml * Fix: 테이블 명 env로 수정 및 기타 콘솔 제거 (#29) * Fix: supabase 초기셋팅 --------- Co-authored-by: minchodang <[email protected]>
- Loading branch information
1 parent
3be07f4
commit 3e59bbe
Showing
4 changed files
with
196 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,18 @@ | ||
import { Module, Global } from "@nestjs/common"; | ||
import { DynamoDB } from "@aws-sdk/client-dynamodb"; | ||
import { DynamoDBDocument } from "@aws-sdk/lib-dynamodb"; | ||
import { Module, Global } from '@nestjs/common'; | ||
import { createClient } from '@supabase/supabase-js'; | ||
|
||
@Global() | ||
@Module({ | ||
providers: [ | ||
{ | ||
provide: "DYNAMODB", | ||
provide: 'SUPABASE', | ||
useFactory: () => { | ||
const client = new DynamoDB({ | ||
credentials: { | ||
accessKeyId: process.env.AWS_ACCESS_KEY_ID, | ||
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, | ||
}, | ||
region: process.env.REGION, | ||
}); | ||
return DynamoDBDocument.from(client); | ||
const supabaseUrl = process.env.SUPABASE_URL; | ||
const supabaseKey = process.env.SUPABASE_KEY; | ||
return createClient(supabaseUrl, supabaseKey); | ||
}, | ||
}, | ||
], | ||
exports: ["DYNAMODB"], | ||
exports: ['SUPABASE'], | ||
}) | ||
export class DynamoDBModule {} | ||
export class SupabaseModule {} |