UNPKG

@tsed/cli

Version:
15 lines (14 loc) 602 B
import { injectMany } from "@tsed/cli-core"; import { injectable } from "@tsed/di"; import { InitExpressPlatform } from "./supports/InitExpressPlatform.js"; import { InitFastifyPlatform } from "./supports/InitFastifyPlatform.js"; import { InitKoaPlatform } from "./supports/InitKoaPlatform.js"; export class PlatformsModule { constructor() { this.platforms = injectMany("platform:init"); } get(name) { return this.platforms.find((platform) => platform.name === name); } } injectable(PlatformsModule).imports([InitExpressPlatform, InitKoaPlatform, InitFastifyPlatform]);