-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99456c4
commit 74ee20f
Showing
12 changed files
with
158 additions
and
104 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { DataSource } from 'typeorm'; | ||
import path from 'path'; | ||
import * as dotenv from 'dotenv'; | ||
|
||
dotenv.config(); | ||
console.log('Entities Path:', path.join(__dirname, '../**/**/*.entity.{js,ts}')); | ||
export const AppDataSource = new DataSource({ | ||
type: process.env.DB_TYPE as 'mysql', | ||
host: process.env.DB_HOST, | ||
port: Number(process.env.DB_PORT), | ||
username: process.env.DB_USERNAME, | ||
password: process.env.DB_PASSWORD, | ||
database: process.env.DB_DATABASE, | ||
entities: [path.resolve(__dirname, '../server/src/**/*.entity.{js,ts}')], | ||
migrations: [path.resolve(__dirname, '../server/src/migrations/*.{js,ts}')], | ||
synchronize: false, | ||
}); |
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,96 +1,98 @@ | ||
{ | ||
"name": "server", | ||
"version": "0.0.1", | ||
"description": "", | ||
"author": "", | ||
"private": true, | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"build": "nest build", | ||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", | ||
"start": "nest start", | ||
"start:dev": "nest start --watch", | ||
"start:debug": "nest start --debug --watch", | ||
"start:prod": "node dist/src/main.js", | ||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:cov": "jest --coverage", | ||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||
"test:e2e": "jest --config ./test/jest-e2e.json" | ||
}, | ||
"dependencies": { | ||
"@nestjs/axios": "^3.1.2", | ||
"@nestjs/common": "^10.0.0", | ||
"@nestjs/core": "^10.4.7", | ||
"@nestjs/jwt": "^10.2.0", | ||
"@nestjs/platform-express": "^10.0.0", | ||
"@nestjs/platform-socket.io": "^10.4.7", | ||
"@nestjs/schedule": "^4.1.1", | ||
"@nestjs/swagger": "^8.0.5", | ||
"@nestjs/typeorm": "9.0.0", | ||
"@nestjs/websockets": "^10.4.7", | ||
"@types/swagger-ui-express": "^4.1.7", | ||
"axios": "^1.7.7", | ||
"class-transformer": "^0.5.1", | ||
"class-validator": "^0.14.1", | ||
"config": "^3.3.12", | ||
"dotenv": "^16.4.5", | ||
"i": "^0.3.7", | ||
"ioredis": "^5.4.1", | ||
"js-yaml": "^4.1.0", | ||
"mysql2": "^3.11.3", | ||
"reflect-metadata": "^0.2.0", | ||
"rxjs": "^7.8.1", | ||
"tunnel-ssh": "^5.1.2", | ||
"typeorm": "0.3.7", | ||
"uuid": "^11.0.3", | ||
"ws": "^8.18.0" | ||
}, | ||
"devDependencies": { | ||
"@nestjs/cli": "^10.0.0", | ||
"@nestjs/schematics": "^10.0.0", | ||
"@nestjs/testing": "^10.0.0", | ||
"@types/config": "^3", | ||
"@types/dotenv": "^8.2.3", | ||
"@types/express": "^5.0.0", | ||
"@types/jest": "^29.5.2", | ||
"@types/js-yaml": "^4", | ||
"@types/node": "^20.3.1", | ||
"@types/socket.io": "^3.0.2", | ||
"@types/supertest": "^6.0.0", | ||
"@types/ws": "^8.5.13", | ||
"@typescript-eslint/eslint-plugin": "^8.0.0", | ||
"@typescript-eslint/parser": "^8.0.0", | ||
"@yarnpkg/pnpify": "^4.1.3", | ||
"eslint": "^8.0.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"jest": "^29.5.0", | ||
"prettier": "^3.0.0", | ||
"source-map-support": "^0.5.21", | ||
"supertest": "^7.0.0", | ||
"ts-jest": "^29.1.0", | ||
"ts-loader": "^9.4.3", | ||
"ts-node": "^10.9.1", | ||
"tsconfig-paths": "^4.2.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": "src", | ||
"testRegex": ".*\\.spec\\.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"collectCoverageFrom": [ | ||
"**/*.(t|j)s" | ||
], | ||
"coverageDirectory": "../coverage", | ||
"testEnvironment": "node" | ||
} | ||
"name": "server", | ||
"version": "0.0.1", | ||
"description": "", | ||
"author": "", | ||
"private": true, | ||
"license": "UNLICENSED", | ||
"scripts": { | ||
"build": "nest build", | ||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", | ||
"start": "nest start", | ||
"start:dev": "nest start --watch", | ||
"start:debug": "nest start --debug --watch", | ||
"start:prod": "node dist/src/main.js", | ||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix", | ||
"test": "jest", | ||
"test:watch": "jest --watch", | ||
"test:cov": "jest --coverage", | ||
"test:debug": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register node_modules/.bin/jest --runInBand", | ||
"test:e2e": "jest --config ./test/jest-e2e.json", | ||
"typeorm": "ts-node -P ./tsconfig.typeorm.json $(yarn bin typeorm) -d ./data-source.ts" | ||
}, | ||
"dependencies": { | ||
"@nestjs/axios": "^3.1.2", | ||
"@nestjs/common": "^10.0.0", | ||
"@nestjs/core": "^10.4.7", | ||
"@nestjs/jwt": "^10.2.0", | ||
"@nestjs/platform-express": "^10.0.0", | ||
"@nestjs/platform-socket.io": "^10.4.7", | ||
"@nestjs/schedule": "^4.1.1", | ||
"@nestjs/swagger": "^8.0.5", | ||
"@nestjs/typeorm": "9.0.0", | ||
"@nestjs/websockets": "^10.4.7", | ||
"@types/swagger-ui-express": "^4.1.7", | ||
"axios": "^1.7.7", | ||
"class-transformer": "^0.5.1", | ||
"class-validator": "^0.14.1", | ||
"config": "^3.3.12", | ||
"dotenv": "^16.4.5", | ||
"i": "^0.3.7", | ||
"ioredis": "^5.4.1", | ||
"js-yaml": "^4.1.0", | ||
"mysql2": "^3.11.3", | ||
"reflect-metadata": "^0.2.0", | ||
"rxjs": "^7.8.1", | ||
"tunnel-ssh": "^5.1.2", | ||
"typeorm": "^0.3.20", | ||
"uuid": "^11.0.3", | ||
"ws": "^8.18.0", | ||
"src": "workspace:*" | ||
}, | ||
"devDependencies": { | ||
"@nestjs/cli": "^10.0.0", | ||
"@nestjs/schematics": "^10.0.0", | ||
"@nestjs/testing": "^10.0.0", | ||
"@types/config": "^3", | ||
"@types/dotenv": "^8.2.3", | ||
"@types/express": "^5.0.0", | ||
"@types/jest": "^29.5.2", | ||
"@types/js-yaml": "^4", | ||
"@types/node": "^20.3.1", | ||
"@types/socket.io": "^3.0.2", | ||
"@types/supertest": "^6.0.0", | ||
"@types/ws": "^8.5.13", | ||
"@typescript-eslint/eslint-plugin": "^8.0.0", | ||
"@typescript-eslint/parser": "^8.0.0", | ||
"@yarnpkg/pnpify": "^4.1.3", | ||
"eslint": "^8.0.0", | ||
"eslint-config-prettier": "^9.0.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"jest": "^29.5.0", | ||
"prettier": "^3.0.0", | ||
"source-map-support": "^0.5.21", | ||
"supertest": "^7.0.0", | ||
"ts-jest": "^29.1.0", | ||
"ts-loader": "^9.4.3", | ||
"ts-node": "^10.9.2", | ||
"tsconfig-paths": "^4.2.0", | ||
"typescript": "^5.6.3" | ||
}, | ||
"jest": { | ||
"moduleFileExtensions": [ | ||
"js", | ||
"json", | ||
"ts" | ||
], | ||
"rootDir": "src", | ||
"testRegex": ".*\\.spec\\.ts$", | ||
"transform": { | ||
"^.+\\.(t|j)s$": "ts-jest" | ||
}, | ||
"collectCoverageFrom": [ | ||
"**/*.(t|j)s" | ||
], | ||
"coverageDirectory": "../coverage", | ||
"testEnvironment": "node" | ||
} | ||
} |
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
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
11 changes: 11 additions & 0 deletions
11
packages/server/src/migrations/1731911925616-consent-record.ts
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class ConsentRecord1731911925616 implements MigrationInterface { | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
} | ||
|
||
} |
11 changes: 11 additions & 0 deletions
11
packages/server/src/migrations/1731911957654-consent-record.ts
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm"; | ||
|
||
export class ConsentRecord1731911957654 implements MigrationInterface { | ||
|
||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
} | ||
|
||
public async down(queryRunner: QueryRunner): Promise<void> { | ||
} | ||
|
||
} |
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
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"extends": "./tsconfig.json", // 기존 tsconfig.json 파일을 확장 | ||
"compilerOptions": { | ||
"module": "CommonJS", // TypeORM CLI는 CommonJS를 필요로 함 | ||
"target": "ES2020", // 실행 환경에 맞게 설정 | ||
"outDir": "./dist", // 출력 디렉토리 | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"skipLibCheck": true | ||
}, | ||
"include": ["./src/**/*.ts"], // 필요한 파일 경로 포함 | ||
"exclude": ["node_modules"] // 불필요한 경로 제외 | ||
} |