-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathapp.ts
37 lines (22 loc) · 770 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
26
27
28
29
30
31
32
33
34
35
36
37
// < Project Heimir by Alex Arbuckle > //
// import <
const cron = require('node-cron');
import { axiosGet } from 'lxrbckl';
import { Archive } from './src/types/archiveManager';
import archiveManager from './src/managers/archiveManager';
import archiveConfig from './src/config/archiveManagerConfig';
//
(async () => {
cron.schedule('0 0 * * *', async () => {
// initialize object <
const archiveHandler: archiveManager = new archiveManager({
githubUsers : await axiosGet(archiveConfig.urlGitHubUsers)
});
// >
// build archive <
// publish archive <
const archive: Archive = await archiveHandler.getArchive();
await archiveHandler.setArchive({archive : archive});
// >
});
})();