mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
refactor(app.ts): move cron function and startFirehose function to startup.ts
This commit is contained in:
parent
23bb24929c
commit
ddd1972c83
1 changed files with 0 additions and 10 deletions
10
src/app.ts
10
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<AppEnv>({ 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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue