Skip to content

Commit

Permalink
Fix: db migration (#38)
Browse files Browse the repository at this point in the history
* 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
minchodang and minchodang authored Sep 4, 2024
1 parent 3be07f4 commit 3e59bbe
Show file tree
Hide file tree
Showing 4 changed files with 196 additions and 16 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
## meta-test-be

## fork sync test2

추가 테스트!!!
### 프로젝트 설정
```js
git clone https://github.com/kode-krew/meta-test-be.git
Expand Down
186 changes: 186 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"@nestjs/passport": "^10.0.3",
"@nestjs/platform-express": "^10.0.0",
"@nestjs/swagger": "^7.3.0",
"@supabase/supabase-js": "^2.45.3",
"bcrypt": "^5.1.1",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.1",
Expand Down
22 changes: 8 additions & 14 deletions src/database/dynamodb/dynamodb.module.ts
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 {}

0 comments on commit 3e59bbe

Please sign in to comment.