From ddd1972c831b025a0a891188bcee6df69c6560f3 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Wed, 24 Jul 2024 10:55:30 -0300 Subject: [PATCH] refactor(app.ts): move cron function and startFirehose function to startup.ts --- src/app.ts | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/app.ts b/src/app.ts index f9dad138..690862eb 100644 --- a/src/app.ts +++ b/src/app.ts @@ -5,9 +5,6 @@ import { logger } from '@hono/hono/logger'; import { NostrEvent, NostrSigner, NStore, NUploader } from '@nostrify/nostrify'; import Debug from '@soapbox/stickynotes/debug'; -import { Conf } from '@/config.ts'; -import { cron } from '@/cron.ts'; -import { startFirehose } from '@/firehose.ts'; import { Time } from '@/utils/time.ts'; import { @@ -145,13 +142,6 @@ const app = new Hono({ strict: false }); const debug = Debug('ditto:http'); -if (Conf.firehoseEnabled) { - startFirehose(); -} -if (Conf.cronEnabled) { - cron(); -} - app.use('*', rateLimitMiddleware(300, Time.minutes(5))); app.use('/api/*', metricsMiddleware, logger(debug));