diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -125,7 +125,7 @@ import { PeerTubeVersionCheckScheduler } from './server/lib/schedulers/peertube- | |||
125 | import { Hooks } from './server/lib/plugins/hooks' | 125 | import { Hooks } from './server/lib/plugins/hooks' |
126 | import { PluginManager } from './server/lib/plugins/plugin-manager' | 126 | import { PluginManager } from './server/lib/plugins/plugin-manager' |
127 | import { LiveManager } from './server/lib/live' | 127 | import { LiveManager } from './server/lib/live' |
128 | import { HttpStatusCode } from './shared/core-utils/miscs/http-error-codes' | 128 | import { HttpStatusCode } from './shared/models/http/http-error-codes' |
129 | import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache' | 129 | import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache' |
130 | import { ServerConfigManager } from '@server/lib/server-config-manager' | 130 | import { 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 | ||