use platform services in startup routines
This commit is contained in:
parent
b751f9c96d
commit
86ca3921c9
14 changed files with 117 additions and 93 deletions
|
|
@ -21,6 +21,9 @@ import type * as misskey from 'misskey-js';
|
|||
import { DEFAULT_POLICIES } from '@/core/RoleService.js';
|
||||
import { validateContentTypeSetAsActivityPub } from '@/core/activitypub/misc/validator.js';
|
||||
import { ApiError } from '@/server/api/error.js';
|
||||
import { LoggerService } from '@/core/LoggerService.js';
|
||||
import { EnvService } from '@/global/EnvService.js';
|
||||
import { NativeTimeService } from '@/global/TimeService.js';
|
||||
|
||||
export { server as startServer, jobQueue as startJobQueue } from '@/boot/common.js';
|
||||
|
||||
|
|
@ -38,7 +41,9 @@ export type SystemWebhookPayload = {
|
|||
body: any;
|
||||
};
|
||||
|
||||
const config = loadConfig();
|
||||
// eslint-disable-next-line no-restricted-globals
|
||||
const loggerService = new LoggerService(console, new NativeTimeService(), new EnvService());
|
||||
const config = loadConfig(loggerService);
|
||||
export const port = config.port;
|
||||
export const origin = config.url;
|
||||
export const host = new URL(config.url).host;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue