mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 22:15:28 +02:00
enhance(backend): bundle backend using Rolldown (#17068)
* enhance(backend): bundle backend using rolldown
* fix
* fix [ci skip]
* remove unused build script
* fix
* enhance: 起動からlistenまでかかる時間を減らす (MisskeyIO#1410)
* ✌️
* fix
* update rolldown
* fix(backend): extract static error classes to avoid rolldown design:paramtypes omission
* update rolldown
* Revert "fix(backend): extract static error classes to avoid rolldown design:paramtypes omission"
This reverts commit e2243c9dc3.
* fix
* perf: avoid generating sourcemap in production
* fix
* fix
* fix
* fix paths
* fix
* fix
* fix
* fix
* fix
* enhance: バックエンドの開発サーバー制御をrolldown側で行うように
* remove nodemon
* Update Changelog
* tweak config
* fix
* fix
* fix
* clean up
---------
Co-authored-by: あわわわとーにゅ <17376330+u1-liquid@users.noreply.github.com>
Co-authored-by: bab <mashirohira@gmail.com>
This commit is contained in:
@@ -4,16 +4,12 @@
|
||||
*/
|
||||
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { ChartManagementService } from '@/core/chart/ChartManagementService.js';
|
||||
import { QueueProcessorService } from '@/queue/QueueProcessorService.js';
|
||||
import { NestLogger } from '@/NestLogger.js';
|
||||
import { QueueProcessorModule } from '@/queue/QueueProcessorModule.js';
|
||||
import { QueueStatsService } from '@/daemons/QueueStatsService.js';
|
||||
import { ServerStatsService } from '@/daemons/ServerStatsService.js';
|
||||
import { ServerService } from '@/server/ServerService.js';
|
||||
import { MainModule } from '@/MainModule.js';
|
||||
|
||||
export async function server() {
|
||||
const { MainModule } = await import('../MainModule.js');
|
||||
const { ServerService } = await import('../server/ServerService.js');
|
||||
|
||||
const app = await NestFactory.createApplicationContext(MainModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
@@ -22,6 +18,10 @@ export async function server() {
|
||||
await serverService.launch();
|
||||
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
const { ChartManagementService } = await import('../core/chart/ChartManagementService.js');
|
||||
const { QueueStatsService } = await import('../daemons/QueueStatsService.js');
|
||||
const { ServerStatsService } = await import('../daemons/ServerStatsService.js');
|
||||
|
||||
app.get(ChartManagementService).start();
|
||||
app.get(QueueStatsService).start();
|
||||
app.get(ServerStatsService).start();
|
||||
@@ -31,6 +31,10 @@ export async function server() {
|
||||
}
|
||||
|
||||
export async function jobQueue() {
|
||||
const { QueueProcessorModule } = await import('../queue/QueueProcessorModule.js');
|
||||
const { QueueProcessorService } = await import('../queue/QueueProcessorService.js');
|
||||
const { ChartManagementService } = await import('../core/chart/ChartManagementService.js');
|
||||
|
||||
const jobQueue = await NestFactory.createApplicationContext(QueueProcessorModule, {
|
||||
logger: new NestLogger(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user