mirror of
https://github.com/patdelphi/suanming.git
synced 2026-02-28 05:33:11 +08:00
添加Koyeb部署配置和文档
This commit is contained in:
@@ -5,7 +5,10 @@ const fs = require('fs');
|
||||
class DatabaseManager {
|
||||
constructor() {
|
||||
this.db = null;
|
||||
this.dbPath = path.join(__dirname, '../../numerology.db');
|
||||
// 生产环境使用持久化存储路径,开发环境使用本地路径
|
||||
this.dbPath = process.env.NODE_ENV === 'production'
|
||||
? '/app/data/numerology.db'
|
||||
: path.join(__dirname, '../../numerology.db');
|
||||
this.schemaPath = path.join(__dirname, 'schema.sql');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user