-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.ts
25 lines (20 loc) · 805 Bytes
/
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
// config
import { config } from './config';
// routers
import { ImageRouter } from './routers/image.router';
import { StatsRouter } from './routers/stats.router';
// services
import { CacheService } from './services/cache.service';
import { StorageService } from './services/storage.service';
import { WebService } from './services/web.service';
const cacheService = CacheService.getInstance();
const storageService = StorageService.getInstance();
const imageWebService = new WebService('image', config.web.image, new ImageRouter());
const statsWebService = new WebService('stats', config.web.stats, new StatsRouter());
async function initialize() {
cacheService.initialize();
storageService.initialize();
await imageWebService.listen();
await statsWebService.listen();
}
void initialize();