summaryrefslogtreecommitdiff
path: root/src/boot/master.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/boot/master.ts')
-rw-r--r--src/boot/master.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/boot/master.ts b/src/boot/master.ts
index 03a28c339b..d9cc7c16be 100644
--- a/src/boot/master.ts
+++ b/src/boot/master.ts
@@ -1,3 +1,6 @@
+import * as fs from 'fs';
+import { fileURLToPath } from 'url';
+import { dirname } from 'path';
import * as os from 'os';
import * as cluster from 'cluster';
import * as chalk from 'chalk';
@@ -11,7 +14,12 @@ import { lessThan } from '@/prelude/array';
import { program } from '../argv';
import { showMachineInfo } from '@/misc/show-machine-info';
import { initDb } from '../db/postgre';
-import * as meta from '../meta.json';
+
+//const _filename = fileURLToPath(import.meta.url);
+const _filename = __filename;
+const _dirname = dirname(_filename);
+
+const meta = JSON.parse(fs.readFileSync(`${_dirname}/../meta.json`, 'utf-8'));
const logger = new Logger('core', 'cyan');
const bootLogger = logger.createSubLogger('boot', 'magenta', false);