Add server events emitter

This commit is contained in:
Cohee
2025-03-06 14:55:50 +00:00
parent c36607be6f
commit 6b821409e0
3 changed files with 54 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ import bodyParser from 'body-parser';
import open from 'open';
// local library imports
import { serverEvents, EVENT_NAMES } from './src/server-events.js';
import { CommandLineParser } from './src/command-line.js';
import { loadPlugins } from './src/plugin-loader.js';
import {
@@ -348,6 +349,7 @@ async function postSetupTasks(result) {
console.log('\n' + getSeparator(plainGoToLog.length) + '\n');
setupLogLevel();
serverEvents.emit(EVENT_NAMES.SERVER_STARTED, { url: autorunUrl });
}
/**