create-fullstack-scaffold 0.5.1 → 0.5.2
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/package.json
CHANGED
package/template/package.json
CHANGED
|
@@ -66,9 +66,7 @@ export function getAppConfig(): AppConfig {
|
|
|
66
66
|
database: {
|
|
67
67
|
driver: isCloudflare ? 'd1' : dbDriver,
|
|
68
68
|
sqlitePath:
|
|
69
|
-
typeof process !== 'undefined'
|
|
70
|
-
? process.env.SQLITE_PATH || `./data/${nodeEnv}.db`
|
|
71
|
-
: undefined,
|
|
69
|
+
typeof process !== 'undefined' ? process.env.SQLITE_PATH || './data/app.db' : undefined,
|
|
72
70
|
mysqlHost: typeof process !== 'undefined' ? process.env.MYSQL_HOST || 'localhost' : undefined,
|
|
73
71
|
mysqlPort:
|
|
74
72
|
typeof process !== 'undefined' ? parseInt(process.env.MYSQL_PORT || '3306', 10) : undefined,
|
|
@@ -202,7 +202,9 @@ export async function startServer() {
|
|
|
202
202
|
await initializeDatabase()
|
|
203
203
|
bootstrapLog.info({}, 'Database ready')
|
|
204
204
|
} catch (err) {
|
|
205
|
-
|
|
205
|
+
// pino 走异步 thread-stream transport,process.exit 前不 flush——
|
|
206
|
+
// 生产致命错误必须同步 console.error,否则静默死(exit 1 零输出)
|
|
207
|
+
console.error('Database initialization failed:', err)
|
|
206
208
|
process.exit(1)
|
|
207
209
|
}
|
|
208
210
|
|