-
Notifications
You must be signed in to change notification settings - Fork 910
/
Copy pathapp.ts
47 lines (43 loc) · 1.51 KB
/
app.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
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import 'reflect-metadata';
import { bootstrapMicroframework } from 'microframework-w3tec';
import { banner } from './lib/banner';
import { Logger } from './lib/logger';
import { eventDispatchLoader } from './loaders/eventDispatchLoader';
import { expressLoader } from './loaders/expressLoader';
import { graphqlLoader } from './loaders/graphqlLoader';
import { homeLoader } from './loaders/homeLoader';
import { iocLoader } from './loaders/iocLoader';
import { monitorLoader } from './loaders/monitorLoader';
import { publicLoader } from './loaders/publicLoader';
import { swaggerLoader } from './loaders/swaggerLoader';
import { typeormLoader } from './loaders/typeormLoader';
import { winstonLoader } from './loaders/winstonLoader';
/**
* EXPRESS TYPESCRIPT BOILERPLATE
* ----------------------------------------
*
* This is a boilerplate for Node.js Application written in TypeScript.
* The basic layer of this app is express. For further information visit
* the 'README.md' file.
*/
const log = new Logger(__filename);
bootstrapMicroframework({
/**
* Loader is a place where you can configure all your modules during microframework
* bootstrap process. All loaders are executed one by one in a sequential order.
*/
loaders: [
winstonLoader,
iocLoader,
eventDispatchLoader,
typeormLoader,
expressLoader,
swaggerLoader,
monitorLoader,
homeLoader,
publicLoader,
graphqlLoader,
],
})
.then(() => banner(log))
.catch(error => log.error('Application is crashed: ' + error));