Register plugins when peertube server is ready

pull/4271/head
Chocobozzz 2021-07-21 15:56:49 +02:00
parent a24bd1ed41
commit e19fdf5775
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 9 additions and 3 deletions

View File

@ -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)