1 |
rakinar2 |
575 |
import Application from "@framework/app/Application"; |
2 |
|
|
import { Logger } from "@framework/log/Logger"; |
3 |
|
|
import path from "path"; |
4 |
|
|
import { version } from '../../package.json'; |
5 |
|
|
import { createClient } from "./client.mock"; |
6 |
|
|
|
7 |
|
|
export const createApplication = () => { |
8 |
|
|
const client = createClient(); |
9 |
|
|
const application = new Application(path.resolve(__dirname), path.resolve(__dirname, "../../.."), version); |
10 |
|
|
|
11 |
|
|
application.setClient(client); |
12 |
|
|
application.setLogger(new Logger("test_system", true)); |
13 |
|
|
application.container.bind(Application, { |
14 |
|
|
key: "application", |
15 |
|
|
singleton: true, |
16 |
|
|
factory: () => application |
17 |
|
|
}); |
18 |
|
|
|
19 |
|
|
return application; |
20 |
|
|
}; |