Skip to content

Commit

Permalink
剩余任务部署反向代理服务器,完善主题,完成回收站功能,添加缓存数据库提高性能
Browse files Browse the repository at this point in the history
  • Loading branch information
checkma-xh committed Mar 16, 2024
1 parent 82f94ac commit e2d0967
Show file tree
Hide file tree
Showing 4 changed files with 118 additions and 3 deletions.
10 changes: 8 additions & 2 deletions database/.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ SECRET_KEY = 639b9281563047dea7e4d4251738d09b
ACCESS_TOKEN_EXPIRATION = 10800
REFRESH_TOKEN_EXPIRATION = 86400
SYSTEM_EMAIL = checkma_xh@outlook.com
SYSTEM_EMAIL_PASSWORD = Wlj += 9351524
SYSTEM_EMAIL_PASSWORD = Wlj+=9351524
VERIFICATION_CODE_LEN = 4
VERIFICATION_MAX_COUNT = 5
VERIFICATION_MAX_COUNT = 5
DATABASE_HOST_USER_NAME = root
DATABASE_HOST = 120.24.177.83
DATABASE_PORT = 3306
DATABASE_PASSWORD = Wlj+=9351524
DATABASE_TYPE = mysql
DATAVASE_NAME = app_db
96 changes: 96 additions & 0 deletions database/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 database/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"dotenv": "^16.4.5",
"express": "^4.17.2",
"multer": "^1.4.5-lts.1",
"mysql2": "^3.9.2",
"reflect-metadata": "^0.1.13",
"sqlite3": "^5.0.2",
"typeorm": "0.3.20"
Expand Down
14 changes: 13 additions & 1 deletion database/src/utils/ConfigService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ export interface Config {
verificationCodeLen : number;
verificationMaxCount : number;
defaultAvatar : string,
databaseHostUserName : string,
databaseHost : string,
databasePort : number,
databasePassword : string,
databaseType : string,
databaseName : string,
}

export class ConfigService {
Expand All @@ -27,8 +33,14 @@ export class ConfigService {
defaultAvatar : process.env.DEFAULT_AVATAR || "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGNsYXNzPSJpb25pY29uIiB2aWV3Qm94PSIwIDAgNTEyIDUxMiI+PHBhdGggZD0iTTI1OC45IDQ4QzE0MS45MiA0Ni40MiA0Ni40MiAxNDEuOTIgNDggMjU4LjljMS41NiAxMTIuMTkgOTIuOTEgMjAzLjU0IDIwNS4xIDIwNS4xIDExNyAxLjYgMjEyLjQ4LTkzLjkgMjEwLjg4LTIxMC44OEM0NjIuNDQgMTQwLjkxIDM3MS4wOSA0OS41NiAyNTguOSA0OHptMTI2LjQyIDMyNy4yNWE0IDQgMCAwMS02LjE0LS4zMiAxMjQuMjcgMTI0LjI3IDAgMDAtMzIuMzUtMjkuNTlDMzIxLjM3IDMyOSAyODkuMTEgMzIwIDI1NiAzMjBzLTY1LjM3IDktOTAuODMgMjUuMzRhMTI0LjI0IDEyNC4yNCAwIDAwLTMyLjM1IDI5LjU4IDQgNCAwIDAxLTYuMTQuMzJBMTc1LjMyIDE3NS4zMiAwIDAxODAgMjU5Yy0xLjYzLTk3LjMxIDc4LjIyLTE3OC43NiAxNzUuNTctMTc5UzQzMiAxNTguODEgNDMyIDI1NmExNzUuMzIgMTc1LjMyIDAgMDEtNDYuNjggMTE5LjI1eiIvPjxwYXRoIGQ9Ik0yNTYgMTQ0Yy0xOS43MiAwLTM3LjU1IDcuMzktNTAuMjIgMjAuODJzLTE5IDMyLTE3LjU3IDUxLjkzQzE5MS4xMSAyNTYgMjIxLjUyIDI4OCAyNTYgMjg4czY0LjgzLTMyIDY3Ljc5LTcxLjI0YzEuNDgtMTkuNzQtNC44LTM4LjE0LTE3LjY4LTUxLjgyQzI5My4zOSAxNTEuNDQgMjc1LjU5IDE0NCAyNTYgMTQ0eiIvPjwvc3ZnPg==",
verificationCodeLen : parseInt(process.env.VERIFICATION_CODE_LEN) || 4,
verificationMaxCount : parseInt(process.env.VERIFICATION_MAX_COUNT) || 5,
databaseHostUserName : process.env.DATABASE_HOST_USER_NAME || "root",
databaseHost : process.env.DATABASE_HOST || "localhost",
databasePort : parseInt(process.env.DATABASE_PORT) || 0,
databasePassword : process.env.DATABASE_PASSWORD || "",
databaseType : process.env.DATABASE_TYPE || "",
databaseName : process.env.DATABASE_NAME || "",
};
}
return ConfigService.config;
}
}
}

0 comments on commit e2d0967

Please sign in to comment.