Refactor service registration and revert lazy loading implementation (#234)

This commit is contained in:
samanhappy
2025-07-20 22:30:09 +08:00
committed by GitHub
parent 0f00ad7200
commit e507bea2e3
4 changed files with 22 additions and 53 deletions

View File

@@ -13,7 +13,6 @@ import {
} from './services/sseService.js';
import { initializeDefaultUser } from './models/User.js';
import { sseUserContextMiddleware } from './middlewares/userContext.js';
import { initializeServices } from './services/services.js';
// Get the current working directory (will be project root in most cases)
const currentFileDir = process.cwd() + '/src';
@@ -32,9 +31,6 @@ export class AppServer {
async initialize(): Promise<void> {
try {
// Initialize services
await initializeServices();
// Initialize default admin user if no users exist
await initializeDefaultUser();