MCPcopy
hub / github.com/adonisjs/core / #notifyServerHasStarted

Method #notifyServerHasStarted

src/ignitor/http.ts:125–145  ·  view source on GitHub ↗

* Notifies the app and the parent process that the HTTP server is ready. * Sends notifications through multiple channels: parent process, logger, and event emitter. * * @param app - The application service instance for parent process notification * @param logger - The logger service for

(
    app: ApplicationService,
    logger: LoggerService,
    emitter: EmitterService,
    payload: { host: string; port: number; duration: [number, number] }
  )

Source from the content-addressed store, hash-verified

123 * @param payload - Server startup information including host, port, and duration
124 */
125 #notifyServerHasStarted(
126 app: ApplicationService,
127 logger: LoggerService,
128 emitter: EmitterService,
129 payload: { host: string; port: number; duration: [number, number] }
130 ) {
131 /**
132 * Notify parent process
133 */
134 app.notify({ isAdonisJS: true, environment: 'web', ...payload })
135
136 /**
137 * Visual notification
138 */
139 logger.info('started HTTP server on %s:%s', payload.host, payload.port)
140
141 /**
142 * Notify app
143 */
144 emitter.emit('http:server_ready', payload)
145 }
146
147 /**
148 * Start the HTTP server by wiring up the application

Callers 1

startMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected