1 | ;
|
2 | /*Redis*/const redisStore = require('koa-redis');/*Redis*/
|
3 | module.exports = {
|
4 | /*MySQL*/orm: {
|
5 | dialect: 'mysql',
|
6 | database: 'db_auth',
|
7 | username: 'root',
|
8 | password: null,
|
9 | host: '127.0.0.1',
|
10 | port: 3306,
|
11 | pool: {
|
12 | maxConnections: 5,
|
13 | maxIdleTime: 3000
|
14 | }
|
15 | },/*MySQL*/
|
16 | /*PostgreSQL*/orm: {
|
17 | dialect: 'postgres',
|
18 | database: 'db_auth',
|
19 | username: 'postgres',
|
20 | password: 'postgres',
|
21 | host: '127.0.0.1',
|
22 | port: 5432,
|
23 | pool: {
|
24 | maxConnections: 5,
|
25 | maxIdleTime: 3000
|
26 | }
|
27 | },/*PostgreSQL*/
|
28 | /*MariaDB*/orm: {
|
29 | dialect: 'mariadb',
|
30 | database: 'db_auth',
|
31 | username: 'root',
|
32 | password: null,
|
33 | host: '127.0.0.1',
|
34 | port: 3306,
|
35 | pool: {
|
36 | maxConnections: 5,
|
37 | maxIdleTime: 3000
|
38 | }
|
39 | },/*MariaDB*/
|
40 | /*MSSQL*/orm: {
|
41 | dialect: 'mssql',
|
42 | database: 'db_auth',
|
43 | username: 'sa',
|
44 | password: '123456',
|
45 | host: '127.0.0.1',
|
46 | port: 1433,
|
47 | pool: {
|
48 | maxConnections: 5,
|
49 | maxIdleTime: 3000
|
50 | }
|
51 | },/*MSSQL*/
|
52 | /*Redis*/session: {
|
53 | store: redisStore({
|
54 | host: '127.0.0.1',
|
55 | port: 6379
|
56 | })
|
57 | },/*Redis*/
|
58 | domain: '__domain__',
|
59 | logo: '__logo__',
|
60 | isTOTP: true,
|
61 | mail: {
|
62 | from: '系统管理员 <admin@example.com>',
|
63 | host: 'smtp.example.com',
|
64 | port: 465,
|
65 | secure: true,
|
66 | auth: {
|
67 | user: 'admin@example.com',
|
68 | pass: 'admin'
|
69 | }
|
70 | }
|
71 | };
|