deno.land / x / alosaur@v1.1.1 / examples / customdi / app.ts

نووسراو ببینە
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
import { Container, SLContainer } from "../../src/di/mod.ts";import { HomeArea } from "./areas/home/home.area.ts";import { App } from "alosaur/mod.ts";import { FooService } from "./services/foo.service.ts";
const container = SLContainer.createChildContainer();
const service = new FooService();service.setName("Bar");
container.register("FooService", service);
const app = new App({ areas: [HomeArea], logging: false, container,});
app.listen();
alosaur

Version Info

Tagged at
a year ago