xPulse
πŸ‡©πŸ‡ͺ DE
Seiten
Inhalt

@xpulse/controller – API

controller.init(options?)

Discovert alle Controller unter src/controllers/ und registriert ihre Routes.

import controller from '@xpulse/controller';
await controller.init();

controller.list()

Gibt alle registrierten Routes zurΓΌck.

Controller schreiben

import { Controller } from '@xpulse/controller';
export default class InfoController extends Controller {
// GET /info
async index() {
return this.render('info/index', { title: 'Info' });
}
// GET /info/team
async team() {
return this.render('info/team', { title: 'Team' });
}
}

Events

Event Payload Wann
controller:init { root } Discovery beginnt
controller:discovered { name, routes } Controller gefunden
controller:ready { count, routes } Alle registriert
controller:called { traceId, controller, action, method, path, name } Handler aufgerufen
de/api.md 2026-04-10