X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=server.ts;h=bfc7ee1450867bfdddf45d54f18ade4ff5f92fd8;hb=e1220d60f2806c34240d79d0f43b87c506cff8c7;hp=e46300dcef4be56974a82d84ba58bee6d27af6a9;hpb=943dc18254bf7d20415ace9103a290fe565d963a;p=github%2FChocobozzz%2FPeerTube.git 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- import { Hooks } from './server/lib/plugins/hooks' import { PluginManager } from './server/lib/plugins/plugin-manager' import { LiveManager } from './server/lib/live' -import { HttpStatusCode } from './shared/core-utils/miscs/http-error-codes' +import { HttpStatusCode } from './shared/models/http/http-error-codes' import { VideosTorrentCache } from '@server/lib/files-cache/videos-torrent-cache' import { ServerConfigManager } from '@server/lib/server-config-manager' @@ -305,13 +305,19 @@ async function startApplication () { updateStreamingPlaylistsInfohashesIfNeeded() .catch(err => logger.error('Cannot update streaming playlist infohashes.', { err })) - if (cliOptions.plugins) await PluginManager.Instance.registerPluginsAndThemes() - LiveManager.Instance.init() if (CONFIG.LIVE.ENABLED) LiveManager.Instance.run() // Make server listening - server.listen(port, hostname, () => { + server.listen(port, hostname, async () => { + if (cliOptions.plugins) { + try { + await PluginManager.Instance.registerPluginsAndThemes() + } catch (err) { + logger.error('Cannot register plugins and themes.', { err }) + } + } + logger.info('HTTP server listening on %s:%d', hostname, port) logger.info('Web server: %s', WEBSERVER.URL)