mirror of
https://github.com/orangecoding/fredy.git
synced 2026-06-16 12:31:07 +00:00
14 lines
353 B
JavaScript
Executable File
14 lines
353 B
JavaScript
Executable File
const fs = require('fs');
|
|
const path = './lib/provider';
|
|
const sources = fs.readdirSync(path);
|
|
const config = require('./conf/config.json');
|
|
const stats = require('./lib/services/stats');
|
|
|
|
setInterval(
|
|
(function exec() {
|
|
sources.forEach(source => require(`${path}/${source}`).run(stats));
|
|
return exec;
|
|
})(),
|
|
config.interval * 60 * 1000
|
|
);
|