deno.land / x / alosaur@v1.1.1 / examples / microservice / app / areas / core.area.ts
123456789101112131415161718192021222324import { Area, Controller, Get } from "alosaur/mod.ts";import { MsTcpClient } from "alosaur/microservice/mod.ts";
@Controller({ ctor: { inject: ["TCP_CLIENT"], },})export class CoreController { constructor(private client: MsTcpClient) { }
@Get() async text() { const answer = await this.client.send({ cmd: "sum" }, [1, 2, 3, 4]); return "Hello world, " + answer; }}
@Area({ controllers: [CoreController],})export class CoreArea {}
Version Info