aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts14
1 files changed, 10 insertions, 4 deletions
diff --git a/server.ts b/server.ts
index e46300dce..bfc7ee145 100644
--- a/server.ts
+++ b/server.ts
@@ -125,7 +125,7 @@ import { PeerTubeVersionCheckScheduler } from './server/lib/schedulers/peertube-
125import { Hooks } from './server/lib/plugins/hooks' 125import { Hooks } from './server/lib/plugins/hooks'
126import { PluginManager } from './server/lib/plugins/plugin-manager' 126import { PluginManager } from './server/lib/plugins/plugin-manager'
127import { LiveManager } from './server/lib/live' 127import { LiveManager } from './server/lib/live'
128import { HttpStatusCode } from './shared/core-utils/miscs/http-error-codes' 128import { HttpStatusCode } from './shared/models/http/http-error-codes'
129import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache' 129import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache'
130import { ServerConfigManager } from '@server/lib/server-config-manager' 130import { ServerConfigManager } from '@server/lib/server-config-manager'
131 131
@@ -305,13 +305,19 @@ async function startApplication () {
305 updateStreamingPlaylistsInfohashesIfNeeded() 305 updateStreamingPlaylistsInfohashesIfNeeded()
306 .catch(err => logger.error('Cannot update streaming playlist infohashes.', { err })) 306 .catch(err => logger.error('Cannot update streaming playlist infohashes.', { err }))
307 307
308 if (cliOptions.plugins) await PluginManager.Instance.registerPluginsAndThemes()
309
310 LiveManager.Instance.init() 308 LiveManager.Instance.init()
311 if (CONFIG.LIVE.ENABLED) LiveManager.Instance.run() 309 if (CONFIG.LIVE.ENABLED) LiveManager.Instance.run()
312 310
313 // Make server listening 311 // Make server listening
314 server.listen(port, hostname, () => { 312 server.listen(port, hostname, async () => {
313 if (cliOptions.plugins) {
314 try {
315 await PluginManager.Instance.registerPluginsAndThemes()
316 } catch (err) {
317 logger.error('Cannot register plugins and themes.', { err })
318 }
319 }
320
315 logger.info('HTTP server listening on %s:%d', hostname, port) 321 logger.info('HTTP server listening on %s:%d', hostname, port)
316 logger.info('Web server: %s', WEBSERVER.URL) 322 logger.info('Web server: %s', WEBSERVER.URL)
317 323