1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-06-09 03:14:04 +02:00
This commit is contained in:
syuilo
2025-12-02 11:03:23 +09:00
parent 570a795785
commit 791684efc0
6 changed files with 4 additions and 28 deletions

View File

@@ -223,18 +223,9 @@ const _dirname = dirname(_filename);
const dir = `${_dirname}/../../../.config`;
/**
* Path of configuration file (YAML)
* Path of configuration file
*/
const configYmlPath = process.env.MISSKEY_CONFIG_YML
? resolve(dir, process.env.MISSKEY_CONFIG_YML)
: process.env.NODE_ENV === 'test'
? resolve(dir, 'test.yml')
: resolve(dir, 'default.yml');
/**
* Path of configuration file (JSON, pre-compiled from YAML)
*/
export const path = configYmlPath.replace(/\.yml$/, '.json');
export const path = resolve(dir, 'config.json');
export function loadConfig(): Config {
const meta = JSON.parse(fs.readFileSync(`${_dirname}/../../../built/meta.json`, 'utf-8'));