create-skweb 3.3.2 → 3.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/templates/cjs/src/commands/migrate.js +3 -8
- package/templates/cjs/src/commands/seed.js +2 -7
- package/templates/cjs/src/config/database.js +13 -0
- package/templates/cjs/src/config/redis.js +9 -0
- package/templates/cjs/src/cron-framework.js +5 -13
- package/templates/cjs/src/web-framework.js +5 -13
- package/templates/mjs/src/commands/migrate.js +3 -8
- package/templates/mjs/src/commands/seed.js +2 -7
- package/templates/mjs/src/config/database.js +11 -0
- package/templates/mjs/src/config/redis.js +7 -0
- package/templates/mjs/src/cron-framework.js +5 -13
- package/templates/mjs/src/web-framework.js +5 -13
- package/templates/ts/src/commands/migrate.ts +3 -8
- package/templates/ts/src/commands/seed.ts +2 -7
- package/templates/ts/src/config/database.ts +13 -0
- package/templates/ts/src/config/redis.ts +9 -0
- package/templates/ts/src/cron-framework.ts +5 -13
- package/templates/ts/src/web-framework.ts +5 -13
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
|
|
2
|
-
> create-skweb@3.3.
|
|
2
|
+
> create-skweb@3.3.3 prebuild
|
|
3
3
|
> tsc --outDir dist --rootDir src
|
|
4
4
|
|
|
5
5
|
⠙[1G[0K
|
|
6
|
-
> create-skweb@3.3.
|
|
6
|
+
> create-skweb@3.3.3 build
|
|
7
7
|
> rollup -c rollup.config.mjs && node scripts/inject-shebang.mjs && chmod +x dist/cli.js
|
|
8
8
|
|
|
9
9
|
⠙[1G[0K[36m
|
|
10
10
|
[1msrc/index.ts[22m → [1mdist/index.js[22m...[39m
|
|
11
11
|
[1m[33m(!) [plugin typescript] @rollup/plugin-typescript: outputToFilesystem option is defaulting to true.[39m[22m
|
|
12
|
-
[32mcreated [1mdist/index.js[22m in [
|
|
12
|
+
[32mcreated [1mdist/index.js[22m in [1m361ms[22m[39m
|
|
13
13
|
[36m
|
|
14
14
|
[1msrc/cli.ts[22m → [1mdist/cli.js[22m...[39m
|
|
15
|
-
[32mcreated [1mdist/cli.js[22m in [
|
|
15
|
+
[32mcreated [1mdist/cli.js[22m in [1m185ms[22m[39m
|
|
16
16
|
[inject-shebang] Shebang added to /Users/stayknight/projects/skweb-mono/tools/create-skweb/dist/cli.js
|
|
17
17
|
⠙[1G[0K
|
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -3,18 +3,13 @@ require('dotenv/config')
|
|
|
3
3
|
const path = require('path')
|
|
4
4
|
const { Database } = require('skweb-sequelize')
|
|
5
5
|
const { logger } = require('../utils/logger.js')
|
|
6
|
+
const { getDatabaseConfig } = require('../config/database.js')
|
|
6
7
|
|
|
7
8
|
async function runMigrate() {
|
|
8
9
|
logger.info('[migrate] Running database migrations...')
|
|
9
10
|
|
|
10
11
|
const db = new Database({
|
|
11
|
-
|
|
12
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
13
|
-
username: process.env.DB_USER || 'root',
|
|
14
|
-
password: process.env.DB_PASS || '',
|
|
15
|
-
database: process.env.DB_NAME || 'test-project',
|
|
16
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
17
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
12
|
+
...getDatabaseConfig(),
|
|
18
13
|
logging: process.env.DEBUG_DB === 'true' ? (msg) => logger.debug(msg) : false
|
|
19
14
|
})
|
|
20
15
|
|
|
@@ -31,4 +26,4 @@ if (require.main === module) {
|
|
|
31
26
|
})
|
|
32
27
|
}
|
|
33
28
|
|
|
34
|
-
module.exports = { runMigrate }
|
|
29
|
+
module.exports = { runMigrate }
|
|
@@ -4,18 +4,13 @@ const path = require('path')
|
|
|
4
4
|
const fs = require('fs')
|
|
5
5
|
const { Database } = require('skweb-sequelize')
|
|
6
6
|
const { logger } = require('../utils/logger.js')
|
|
7
|
+
const { getDatabaseConfig } = require('../config/database.js')
|
|
7
8
|
|
|
8
9
|
async function runSeed() {
|
|
9
10
|
logger.info('[seed] Initializing database with seed data...')
|
|
10
11
|
|
|
11
12
|
const db = new Database({
|
|
12
|
-
|
|
13
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
14
|
-
username: process.env.DB_USER || 'root',
|
|
15
|
-
password: process.env.DB_PASS || '',
|
|
16
|
-
database: process.env.DB_NAME || 'test-project',
|
|
17
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
18
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
13
|
+
...getDatabaseConfig(),
|
|
19
14
|
logging: process.env.DEBUG_DB === 'true' ? (msg) => logger.debug(msg) : false
|
|
20
15
|
})
|
|
21
16
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function getDatabaseConfig() {
|
|
2
|
+
return {
|
|
3
|
+
host: process.env.DB_HOST || '127.0.0.1',
|
|
4
|
+
port: Number(process.env.DB_PORT) || 3306,
|
|
5
|
+
username: process.env.DB_USER || 'root',
|
|
6
|
+
password: process.env.DB_PASS || '',
|
|
7
|
+
database: process.env.DB_NAME || 'test-project',
|
|
8
|
+
dialect: process.env.DB_DIALECT || 'mysql',
|
|
9
|
+
charset: process.env.DB_CHARSET || 'utf8mb4'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
module.exports = { getDatabaseConfig }
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
const { CronFramework } = require('skweb-framework')
|
|
3
3
|
const { logger } = require('./utils/logger.js')
|
|
4
|
+
const { getDatabaseConfig } = require('./config/database.js')
|
|
5
|
+
const { getRedisConfig } = require('./config/redis.js')
|
|
4
6
|
|
|
5
7
|
const framework = new CronFramework({
|
|
6
8
|
db: {
|
|
7
|
-
|
|
8
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
9
|
-
username: process.env.DB_USER || 'root',
|
|
10
|
-
password: process.env.DB_PASS || '',
|
|
11
|
-
database: process.env.DB_NAME || 'test-project',
|
|
12
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
13
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
9
|
+
...getDatabaseConfig(),
|
|
14
10
|
logging: process.env.DEBUG_DB === 'true'
|
|
15
11
|
},
|
|
16
|
-
redis:
|
|
17
|
-
host: process.env.REDIS_HOST || '127.0.0.1',
|
|
18
|
-
port: Number(process.env.REDIS_PORT) || 6379,
|
|
19
|
-
password: process.env.REDIS_PASSWORD || undefined
|
|
20
|
-
},
|
|
12
|
+
redis: getRedisConfig(),
|
|
21
13
|
channel: 'cron:task:cmd',
|
|
22
14
|
logger,
|
|
23
15
|
onSaveTask: async (taskData) => {
|
|
@@ -40,4 +32,4 @@ const framework = new CronFramework({
|
|
|
40
32
|
}
|
|
41
33
|
})
|
|
42
34
|
|
|
43
|
-
module.exports = { framework }
|
|
35
|
+
module.exports = { framework }
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
const { WebFramework } = require('skweb-framework')
|
|
3
|
+
const { getDatabaseConfig } = require('./config/database.js')
|
|
4
|
+
const { getRedisConfig } = require('./config/redis.js')
|
|
3
5
|
|
|
4
6
|
const framework = new WebFramework({
|
|
5
7
|
db: {
|
|
6
|
-
|
|
7
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
8
|
-
username: process.env.DB_USER || 'root',
|
|
9
|
-
password: process.env.DB_PASS || '',
|
|
10
|
-
database: process.env.DB_NAME || 'test-project',
|
|
11
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
12
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
8
|
+
...getDatabaseConfig(),
|
|
13
9
|
logging: process.env.DEBUG_DB === 'true'
|
|
14
10
|
},
|
|
15
|
-
redis:
|
|
16
|
-
host: process.env.REDIS_HOST || '127.0.0.1',
|
|
17
|
-
port: Number(process.env.REDIS_PORT) || 6379,
|
|
18
|
-
password: process.env.REDIS_PASSWORD || undefined
|
|
19
|
-
}
|
|
11
|
+
redis: getRedisConfig()
|
|
20
12
|
})
|
|
21
13
|
|
|
22
|
-
module.exports = { framework }
|
|
14
|
+
module.exports = { framework }
|
|
@@ -4,6 +4,7 @@ import path from 'path'
|
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
5
|
import { Database } from 'skweb-sequelize'
|
|
6
6
|
import logger from '../utils/logger.js'
|
|
7
|
+
import { getDatabaseConfig } from '../config/database.js'
|
|
7
8
|
|
|
8
9
|
const __filename = fileURLToPath(import.meta.url)
|
|
9
10
|
const __dirname = path.dirname(__filename)
|
|
@@ -12,13 +13,7 @@ async function runMigrate() {
|
|
|
12
13
|
logger.info('[migrate] Running database migrations...')
|
|
13
14
|
|
|
14
15
|
const db = new Database({
|
|
15
|
-
|
|
16
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
17
|
-
username: process.env.DB_USER || 'root',
|
|
18
|
-
password: process.env.DB_PASS || '',
|
|
19
|
-
database: process.env.DB_NAME || 'test-project',
|
|
20
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
21
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
16
|
+
...getDatabaseConfig(),
|
|
22
17
|
logging: process.env.DEBUG_DB === 'true' ? (msg) => logger.debug(msg) : false
|
|
23
18
|
})
|
|
24
19
|
|
|
@@ -34,4 +29,4 @@ if (isMainModule) {
|
|
|
34
29
|
logger.error('[migrate] Fatal error:', err)
|
|
35
30
|
process.exit(1)
|
|
36
31
|
})
|
|
37
|
-
}
|
|
32
|
+
}
|
|
@@ -4,6 +4,7 @@ import path from 'path'
|
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
5
|
import { Database } from 'skweb-sequelize'
|
|
6
6
|
import logger from '../utils/logger.js'
|
|
7
|
+
import { getDatabaseConfig } from '../config/database.js'
|
|
7
8
|
|
|
8
9
|
const __filename = fileURLToPath(import.meta.url)
|
|
9
10
|
const __dirname = path.dirname(__filename)
|
|
@@ -12,13 +13,7 @@ async function runSeed() {
|
|
|
12
13
|
logger.info('[seed] Initializing database with seed data...')
|
|
13
14
|
|
|
14
15
|
const db = new Database({
|
|
15
|
-
|
|
16
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
17
|
-
username: process.env.DB_USER || 'root',
|
|
18
|
-
password: process.env.DB_PASS || '',
|
|
19
|
-
database: process.env.DB_NAME || 'test-project',
|
|
20
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
21
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
16
|
+
...getDatabaseConfig(),
|
|
22
17
|
logging: process.env.DEBUG_DB === 'true' ? (msg) => logger.debug(msg) : false
|
|
23
18
|
})
|
|
24
19
|
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function getDatabaseConfig() {
|
|
2
|
+
return {
|
|
3
|
+
host: process.env.DB_HOST || '127.0.0.1',
|
|
4
|
+
port: Number(process.env.DB_PORT) || 3306,
|
|
5
|
+
username: process.env.DB_USER || 'root',
|
|
6
|
+
password: process.env.DB_PASS || '',
|
|
7
|
+
database: process.env.DB_NAME || 'test-project',
|
|
8
|
+
dialect: process.env.DB_DIALECT || 'mysql',
|
|
9
|
+
charset: process.env.DB_CHARSET || 'utf8mb4'
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { CronFramework } from 'skweb-framework'
|
|
3
3
|
import logger from './utils/logger.js'
|
|
4
|
+
import { getDatabaseConfig } from './config/database.js'
|
|
5
|
+
import { getRedisConfig } from './config/redis.js'
|
|
4
6
|
|
|
5
7
|
const framework = new CronFramework({
|
|
6
8
|
db: {
|
|
7
|
-
|
|
8
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
9
|
-
username: process.env.DB_USER || 'root',
|
|
10
|
-
password: process.env.DB_PASS || '',
|
|
11
|
-
database: process.env.DB_NAME || 'test-project',
|
|
12
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
13
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
9
|
+
...getDatabaseConfig(),
|
|
14
10
|
logging: process.env.DEBUG_DB === 'true'
|
|
15
11
|
},
|
|
16
|
-
redis:
|
|
17
|
-
host: process.env.REDIS_HOST || '127.0.0.1',
|
|
18
|
-
port: Number(process.env.REDIS_PORT) || 6379,
|
|
19
|
-
password: process.env.REDIS_PASSWORD || undefined
|
|
20
|
-
},
|
|
12
|
+
redis: getRedisConfig(),
|
|
21
13
|
channel: 'cron:task:cmd',
|
|
22
14
|
logger,
|
|
23
15
|
onSaveTask: async (taskData) => {
|
|
@@ -40,4 +32,4 @@ const framework = new CronFramework({
|
|
|
40
32
|
}
|
|
41
33
|
})
|
|
42
34
|
|
|
43
|
-
export { framework }
|
|
35
|
+
export { framework }
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { WebFramework } from 'skweb-framework'
|
|
3
|
+
import { getDatabaseConfig } from './config/database.js'
|
|
4
|
+
import { getRedisConfig } from './config/redis.js'
|
|
3
5
|
|
|
4
6
|
const framework = new WebFramework({
|
|
5
7
|
db: {
|
|
6
|
-
|
|
7
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
8
|
-
username: process.env.DB_USER || 'root',
|
|
9
|
-
password: process.env.DB_PASS || '',
|
|
10
|
-
database: process.env.DB_NAME || 'test-project',
|
|
11
|
-
dialect: process.env.DB_DIALECT || 'mysql',
|
|
12
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
8
|
+
...getDatabaseConfig(),
|
|
13
9
|
logging: process.env.DEBUG_DB === 'true'
|
|
14
10
|
},
|
|
15
|
-
redis:
|
|
16
|
-
host: process.env.REDIS_HOST || '127.0.0.1',
|
|
17
|
-
port: Number(process.env.REDIS_PORT) || 6379,
|
|
18
|
-
password: process.env.REDIS_PASSWORD || undefined
|
|
19
|
-
}
|
|
11
|
+
redis: getRedisConfig()
|
|
20
12
|
})
|
|
21
13
|
|
|
22
|
-
export { framework }
|
|
14
|
+
export { framework }
|
|
@@ -4,6 +4,7 @@ import path from 'path'
|
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
5
|
import { Database } from 'skweb-sequelize'
|
|
6
6
|
import logger from '../utils/logger.js'
|
|
7
|
+
import { getDatabaseConfig } from '../config/database.js'
|
|
7
8
|
|
|
8
9
|
const __filename = fileURLToPath(import.meta.url)
|
|
9
10
|
const __dirname = path.dirname(__filename)
|
|
@@ -12,13 +13,7 @@ async function runMigrate(): Promise<void> {
|
|
|
12
13
|
logger.info('[migrate] Running database migrations...')
|
|
13
14
|
|
|
14
15
|
const db = new Database({
|
|
15
|
-
|
|
16
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
17
|
-
username: process.env.DB_USER || 'root',
|
|
18
|
-
password: process.env.DB_PASS || '',
|
|
19
|
-
database: process.env.DB_NAME || 'test-project',
|
|
20
|
-
dialect: (process.env.DB_DIALECT as 'mysql' | 'postgres' | 'sqlite' | 'mariadb') || 'mysql',
|
|
21
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
16
|
+
...getDatabaseConfig(),
|
|
22
17
|
logging: process.env.DEBUG_DB === 'true' ? (msg: string) => logger.debug(msg) : false
|
|
23
18
|
})
|
|
24
19
|
|
|
@@ -34,4 +29,4 @@ if (isMainModule) {
|
|
|
34
29
|
logger.error('[migrate] Fatal error:', err)
|
|
35
30
|
process.exit(1)
|
|
36
31
|
})
|
|
37
|
-
}
|
|
32
|
+
}
|
|
@@ -4,6 +4,7 @@ import path from 'path'
|
|
|
4
4
|
import { fileURLToPath } from 'url'
|
|
5
5
|
import { Database } from 'skweb-sequelize'
|
|
6
6
|
import logger from '../utils/logger.js'
|
|
7
|
+
import { getDatabaseConfig } from '../config/database.js'
|
|
7
8
|
|
|
8
9
|
const __filename = fileURLToPath(import.meta.url)
|
|
9
10
|
const __dirname = path.dirname(__filename)
|
|
@@ -12,13 +13,7 @@ async function runSeed(): Promise<void> {
|
|
|
12
13
|
logger.info('[seed] Initializing database with seed data...')
|
|
13
14
|
|
|
14
15
|
const db = new Database({
|
|
15
|
-
|
|
16
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
17
|
-
username: process.env.DB_USER || 'root',
|
|
18
|
-
password: process.env.DB_PASS || '',
|
|
19
|
-
database: process.env.DB_NAME || 'test-project',
|
|
20
|
-
dialect: (process.env.DB_DIALECT as 'mysql' | 'postgres' | 'sqlite' | 'mariadb') || 'mysql',
|
|
21
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
16
|
+
...getDatabaseConfig(),
|
|
22
17
|
logging: process.env.DEBUG_DB === 'true' ? (msg: string) => logger.debug(msg) : false
|
|
23
18
|
})
|
|
24
19
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { DatabaseConfig } from 'skweb-sequelize'
|
|
2
|
+
|
|
3
|
+
export function getDatabaseConfig(): DatabaseConfig {
|
|
4
|
+
return {
|
|
5
|
+
host: process.env.DB_HOST || '127.0.0.1',
|
|
6
|
+
port: Number(process.env.DB_PORT) || 3306,
|
|
7
|
+
username: process.env.DB_USER || 'root',
|
|
8
|
+
password: process.env.DB_PASS || '',
|
|
9
|
+
database: process.env.DB_NAME || 'test-project',
|
|
10
|
+
dialect: (process.env.DB_DIALECT as any) || 'mysql',
|
|
11
|
+
charset: process.env.DB_CHARSET || 'utf8mb4'
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { RedisOptions } from 'skweb-redis'
|
|
2
|
+
|
|
3
|
+
export function getRedisConfig(): RedisOptions {
|
|
4
|
+
return {
|
|
5
|
+
host: process.env.REDIS_HOST || '127.0.0.1',
|
|
6
|
+
port: Number(process.env.REDIS_PORT) || 6379,
|
|
7
|
+
password: process.env.REDIS_PASSWORD || undefined
|
|
8
|
+
}
|
|
9
|
+
}
|
|
@@ -1,23 +1,15 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { CronFramework } from 'skweb-framework'
|
|
3
3
|
import logger from './utils/logger.js'
|
|
4
|
+
import { getDatabaseConfig } from './config/database.js'
|
|
5
|
+
import { getRedisConfig } from './config/redis.js'
|
|
4
6
|
|
|
5
7
|
const framework = new CronFramework({
|
|
6
8
|
db: {
|
|
7
|
-
|
|
8
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
9
|
-
username: process.env.DB_USER || 'root',
|
|
10
|
-
password: process.env.DB_PASS || '',
|
|
11
|
-
database: process.env.DB_NAME || 'test-project',
|
|
12
|
-
dialect: (process.env.DB_DIALECT as any) || 'mysql',
|
|
13
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
9
|
+
...getDatabaseConfig(),
|
|
14
10
|
logging: process.env.DEBUG_DB === 'true'
|
|
15
11
|
},
|
|
16
|
-
redis:
|
|
17
|
-
host: process.env.REDIS_HOST || '127.0.0.1',
|
|
18
|
-
port: Number(process.env.REDIS_PORT) || 6379,
|
|
19
|
-
password: process.env.REDIS_PASSWORD || undefined
|
|
20
|
-
},
|
|
12
|
+
redis: getRedisConfig(),
|
|
21
13
|
channel: 'cron:task:cmd',
|
|
22
14
|
logger,
|
|
23
15
|
onSaveTask: async (taskData: { taskId: string; cache: unknown; data: unknown }) => {
|
|
@@ -40,4 +32,4 @@ const framework = new CronFramework({
|
|
|
40
32
|
}
|
|
41
33
|
})
|
|
42
34
|
|
|
43
|
-
export { framework }
|
|
35
|
+
export { framework }
|
|
@@ -1,22 +1,14 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
2
|
import { WebFramework } from 'skweb-framework'
|
|
3
|
+
import { getDatabaseConfig } from './config/database.js'
|
|
4
|
+
import { getRedisConfig } from './config/redis.js'
|
|
3
5
|
|
|
4
6
|
const framework = new WebFramework({
|
|
5
7
|
db: {
|
|
6
|
-
|
|
7
|
-
port: Number(process.env.DB_PORT) || 3306,
|
|
8
|
-
username: process.env.DB_USER || 'root',
|
|
9
|
-
password: process.env.DB_PASS || '',
|
|
10
|
-
database: process.env.DB_NAME || 'test-project',
|
|
11
|
-
dialect: (process.env.DB_DIALECT as any) || 'mysql',
|
|
12
|
-
charset: process.env.DB_CHARSET || 'utf8mb4',
|
|
8
|
+
...getDatabaseConfig(),
|
|
13
9
|
logging: process.env.DEBUG_DB === 'true'
|
|
14
10
|
},
|
|
15
|
-
redis:
|
|
16
|
-
host: process.env.REDIS_HOST || '127.0.0.1',
|
|
17
|
-
port: Number(process.env.REDIS_PORT) || 6379,
|
|
18
|
-
password: process.env.REDIS_PASSWORD || undefined
|
|
19
|
-
}
|
|
11
|
+
redis: getRedisConfig()
|
|
20
12
|
})
|
|
21
13
|
|
|
22
|
-
export { framework }
|
|
14
|
+
export { framework }
|