Files
Termix/plugins/wake-on-lan/src/backend/index.ts
T

16 lines
625 B
TypeScript
Raw Normal View History

2026-10-01 16:20:16 -05:00
import type { Router } from "express";
import type { PluginContext } from "@termix/plugin-sdk/backend";
import { createWakeOnLanService } from "./service.js";
import { registerWakeOnLanRoutes } from "./routes.js";
export async function activate(ctx: PluginContext) {
const service = createWakeOnLanService(ctx);
ctx.services.provide("wake-on-lan.send", service);
registerWakeOnLanRoutes(ctx.http.router<Router>(), ctx, service);
ctx.log.info("Wake-on-LAN routes mounted at /plugin-api/wake-on-lan");
}
export async function deactivate() {
// Everything above was registered through ctx and is disposed by core.
}