Skip to content

Commit

Permalink
Register plugins when peertube server is ready
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Jul 21, 2021
1 parent a24bd1e commit e19fdf5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit e19fdf5

Please sign in to comment.