deno.land / x / alosaur@v1.1.1 / examples / microservice / app / areas / core.area.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { 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 {}
alosaur

Version Info

Tagged at
a year ago