diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -103,7 +103,8 @@ import { | |||
103 | webfingerRouter, | 103 | webfingerRouter, |
104 | trackerRouter, | 104 | trackerRouter, |
105 | createWebsocketTrackerServer, | 105 | createWebsocketTrackerServer, |
106 | botsRouter | 106 | botsRouter, |
107 | downloadRouter | ||
107 | } from './server/controllers' | 108 | } from './server/controllers' |
108 | import { advertiseDoNotTrack } from './server/middlewares/dnt' | 109 | import { advertiseDoNotTrack } from './server/middlewares/dnt' |
109 | import { Redis } from './server/lib/redis' | 110 | import { Redis } from './server/lib/redis' |
@@ -123,6 +124,7 @@ import { Hooks } from './server/lib/plugins/hooks' | |||
123 | import { PluginManager } from './server/lib/plugins/plugin-manager' | 124 | import { PluginManager } from './server/lib/plugins/plugin-manager' |
124 | import { LiveManager } from './server/lib/live-manager' | 125 | import { LiveManager } from './server/lib/live-manager' |
125 | import { HttpStatusCode } from './shared/core-utils/miscs/http-error-codes' | 126 | import { HttpStatusCode } from './shared/core-utils/miscs/http-error-codes' |
127 | import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache' | ||
126 | 128 | ||
127 | // ----------- Command line ----------- | 129 | // ----------- Command line ----------- |
128 | 130 | ||
@@ -202,6 +204,7 @@ app.use('/', botsRouter) | |||
202 | 204 | ||
203 | // Static files | 205 | // Static files |
204 | app.use('/', staticRouter) | 206 | app.use('/', staticRouter) |
207 | app.use('/', downloadRouter) | ||
205 | app.use('/', lazyStaticRouter) | 208 | app.use('/', lazyStaticRouter) |
206 | 209 | ||
207 | // Client files, last valid routes! | 210 | // Client files, last valid routes! |
@@ -258,6 +261,7 @@ async function startApplication () { | |||
258 | // Caches initializations | 261 | // Caches initializations |
259 | VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE, FILES_CACHE.PREVIEWS.MAX_AGE) | 262 | VideosPreviewCache.Instance.init(CONFIG.CACHE.PREVIEWS.SIZE, FILES_CACHE.PREVIEWS.MAX_AGE) |
260 | VideosCaptionCache.Instance.init(CONFIG.CACHE.VIDEO_CAPTIONS.SIZE, FILES_CACHE.VIDEO_CAPTIONS.MAX_AGE) | 263 | VideosCaptionCache.Instance.init(CONFIG.CACHE.VIDEO_CAPTIONS.SIZE, FILES_CACHE.VIDEO_CAPTIONS.MAX_AGE) |
264 | VideosTorrentCache.Instance.init(CONFIG.CACHE.TORRENTS.SIZE, FILES_CACHE.TORRENTS.MAX_AGE) | ||
261 | 265 | ||
262 | // Enable Schedulers | 266 | // Enable Schedulers |
263 | ActorFollowScheduler.Instance.enable() | 267 | ActorFollowScheduler.Instance.enable() |