|
@@ -0,0 +1,82 @@
|
|
|
+import { MidwayConfig } from '@midwayjs/core';
|
|
|
+
|
|
|
+const ip = 'localhost';
|
|
|
+
|
|
|
+const dbName = 'cxyy';
|
|
|
+
|
|
|
+const logsDB = 'cxyy_logs';
|
|
|
+
|
|
|
+const dbUsername = 'system';
|
|
|
+
|
|
|
+const dbPwd = '1234qwer!@#$';
|
|
|
+
|
|
|
+const redisHost = 'localhost';
|
|
|
+
|
|
|
+const redisPwd = '1234qwer!@#$';
|
|
|
+
|
|
|
+const redisDB = 0;
|
|
|
+
|
|
|
+const loginSign = 'cxyy';
|
|
|
+export default {
|
|
|
+
|
|
|
+ keys: '1697684406848_4978',
|
|
|
+ loginSign,
|
|
|
+
|
|
|
+ requestTimeLimit: 300,
|
|
|
+ jwt: {
|
|
|
+ secret: 'Ziyouyanfa!@#',
|
|
|
+ expiresIn: 3600,
|
|
|
+ },
|
|
|
+ koa: {
|
|
|
+ port: 9700,
|
|
|
+ globalPrefix: '/cxyy/api',
|
|
|
+ queryParseMode: 'extended',
|
|
|
+ },
|
|
|
+ swagger: {
|
|
|
+ swaggerPath: '/doc/api',
|
|
|
+ },
|
|
|
+ elasticsearch: {
|
|
|
+ node: 'http://192.168.1.197:9200',
|
|
|
+ auth: {
|
|
|
+ username: 'elastic',
|
|
|
+ password: 'NAjqFz_7tS2DkdpU7p*x',
|
|
|
+ },
|
|
|
+ },
|
|
|
+ typeorm: {
|
|
|
+ dataSource: {
|
|
|
+ default: {
|
|
|
+ database: dbName,
|
|
|
+ username: dbUsername,
|
|
|
+ password: dbPwd,
|
|
|
+ host: ip,
|
|
|
+ port: 54321,
|
|
|
+ entities: ['./entity'],
|
|
|
+ type: 'postgres',
|
|
|
+ synchronize: false,
|
|
|
+ logging: true,
|
|
|
+ },
|
|
|
+ logs: {
|
|
|
+ database: logsDB,
|
|
|
+ username: dbUsername,
|
|
|
+ password: dbPwd,
|
|
|
+ host: ip,
|
|
|
+ port: 54321,
|
|
|
+ entities: ['./entityLogs'],
|
|
|
+ type: 'postgres',
|
|
|
+ synchronize: false,
|
|
|
+ logging: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ },
|
|
|
+ redis: {
|
|
|
+ client: {
|
|
|
+ port: 6379,
|
|
|
+ host: redisHost,
|
|
|
+ password: redisPwd,
|
|
|
+ db: redisDB,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ upload: {
|
|
|
+ whitelist: null,
|
|
|
+ },
|
|
|
+} as MidwayConfig;
|