Update master.ts

This commit is contained in:
syuilo 2019-11-24 17:11:53 +09:00
parent f7a328d66e
commit 9985c010bc

View file

@ -11,14 +11,15 @@ import { lessThan } from '../prelude/array';
import { program } from '../argv'; import { program } from '../argv';
import { showMachineInfo } from '../misc/show-machine-info'; import { showMachineInfo } from '../misc/show-machine-info';
import { initDb } from '../db/postgre'; import { initDb } from '../db/postgre';
import * as meta from '../meta.json';
const logger = new Logger('core', 'cyan'); const logger = new Logger('core', 'cyan');
const bootLogger = logger.createSubLogger('boot', 'magenta', false); const bootLogger = logger.createSubLogger('boot', 'magenta', false);
function greet(config: Config) { function greet() {
if (!program.quiet) { if (!program.quiet) {
//#region Misskey logo //#region Misskey logo
const v = `v${config.version}`; const v = `v${meta.version}`;
console.log(' _____ _ _ '); console.log(' _____ _ _ ');
console.log(' | |_|___ ___| |_ ___ _ _ '); console.log(' | |_|___ ___| |_ ___ _ _ ');
console.log(' | | | | |_ -|_ -| \'_| -_| | |'); console.log(' | | | | |_ -|_ -| \'_| -_| | |');
@ -34,7 +35,7 @@ function greet(config: Config) {
} }
bootLogger.info('Welcome to Misskey!'); bootLogger.info('Welcome to Misskey!');
bootLogger.info(`Misskey v${config.version}`, null, true); bootLogger.info(`Misskey v${meta.version}`, null, true);
} }
/** /**
@ -44,11 +45,11 @@ export async function masterMain() {
let config!: Config; let config!: Config;
try { try {
greet();
// initialize app // initialize app
config = await init(); config = await init();
greet(config);
if (config.port == null || Number.isNaN(config.port)) { if (config.port == null || Number.isNaN(config.port)) {
bootLogger.error('The port is not configured. Please configure port.', null, true); bootLogger.error('The port is not configured. Please configure port.', null, true);
process.exit(1); process.exit(1);