diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 15 |
1 files changed, 10 insertions, 5 deletions
@@ -45,7 +45,12 @@ try { | |||
45 | 45 | ||
46 | import { checkConfig, checkActivityPubUrls, checkFFmpegVersion } from './server/initializers/checker-after-init' | 46 | import { checkConfig, checkActivityPubUrls, checkFFmpegVersion } from './server/initializers/checker-after-init' |
47 | 47 | ||
48 | checkConfig() | 48 | try { |
49 | checkConfig() | ||
50 | } catch (err) { | ||
51 | logger.error('Config error.', { err }) | ||
52 | process.exit(-1) | ||
53 | } | ||
49 | 54 | ||
50 | // Trust our proxy (IP forwarding...) | 55 | // Trust our proxy (IP forwarding...) |
51 | app.set('trust proxy', CONFIG.TRUST_PROXY) | 56 | app.set('trust proxy', CONFIG.TRUST_PROXY) |
@@ -102,7 +107,6 @@ import { | |||
102 | wellKnownRouter, | 107 | wellKnownRouter, |
103 | lazyStaticRouter, | 108 | lazyStaticRouter, |
104 | servicesRouter, | 109 | servicesRouter, |
105 | liveRouter, | ||
106 | pluginsRouter, | 110 | pluginsRouter, |
107 | webfingerRouter, | 111 | webfingerRouter, |
108 | trackerRouter, | 112 | trackerRouter, |
@@ -221,9 +225,6 @@ app.use(apiRoute, apiRouter) | |||
221 | // Services (oembed...) | 225 | // Services (oembed...) |
222 | app.use('/services', servicesRouter) | 226 | app.use('/services', servicesRouter) |
223 | 227 | ||
224 | // Live streaming | ||
225 | app.use('/live', liveRouter) | ||
226 | |||
227 | // Plugins & themes | 228 | // Plugins & themes |
228 | app.use('/', pluginsRouter) | 229 | app.use('/', pluginsRouter) |
229 | 230 | ||
@@ -327,6 +328,10 @@ async function startApplication () { | |||
327 | GeoIPUpdateScheduler.Instance.enable() | 328 | GeoIPUpdateScheduler.Instance.enable() |
328 | OpenTelemetryMetrics.Instance.registerMetrics() | 329 | OpenTelemetryMetrics.Instance.registerMetrics() |
329 | 330 | ||
331 | PluginManager.Instance.init(server) | ||
332 | // Before PeerTubeSocket init | ||
333 | PluginManager.Instance.registerWebSocketRouter() | ||
334 | |||
330 | PeerTubeSocket.Instance.init(server) | 335 | PeerTubeSocket.Instance.init(server) |
331 | VideoViewsManager.Instance.init() | 336 | VideoViewsManager.Instance.init() |
332 | 337 | ||