summaryrefslogtreecommitdiff
path: root/src/config.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.ts')
-rw-r--r--src/config.ts7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/config.ts b/src/config.ts
index 916aaab580..342e2db78b 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -6,6 +6,8 @@ import * as fs from 'fs';
import * as yaml from 'js-yaml';
import * as isUrl from 'is-url';
+export const path = (global as any).MISSKEY_CONFIG_PATH ? (global as any).MISSKEY_CONFIG_PATH : `${__dirname}/../.config/config.yml`;
+
/**
* ユーザーが設定する必要のある情報
*/
@@ -62,10 +64,7 @@ interface Mixin {
export type IConfig = ISource & Mixin;
-export default load();
-
-function load() {
- const path = (global as any).MISSKEY_CONFIG_PATH ? (global as any).MISSKEY_CONFIG_PATH : `${__dirname}/../.config/config.yml`;
+export default function load() {
const config = yaml.safeLoad(fs.readFileSync(path, 'utf8')) as ISource;
const mixin: Mixin = {} as Mixin;