feat: create startup file

This commit is contained in:
P. Reis 2024-07-24 10:54:20 -03:00
parent 86874e3a08
commit 1698c1b19b

16
src/startup.ts Normal file
View file

@ -0,0 +1,16 @@
// Starts up applications required to run before the HTTP server is on.
import { Conf } from '@/config.ts';
import { createZapSplitsIfNotExists } from '@/utils/zap-split.ts';
import { cron } from '@/cron.ts';
import { startFirehose } from '@/firehose.ts';
if (Conf.firehoseEnabled) {
startFirehose();
}
if (Conf.cronEnabled) {
cron();
}
await createZapSplitsIfNotExists();