mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2024-09-11 13:37:10 +03:00
Register plugins when peertube server is ready
This commit is contained in:
parent
a24bd1ed41
commit
e19fdf5775
12
server.ts
12
server.ts
@ -305,13 +305,19 @@ async function startApplication () {
|
|||||||
updateStreamingPlaylistsInfohashesIfNeeded()
|
updateStreamingPlaylistsInfohashesIfNeeded()
|
||||||
.catch(err => logger.error('Cannot update streaming playlist infohashes.', { err }))
|
.catch(err => logger.error('Cannot update streaming playlist infohashes.', { err }))
|
||||||
|
|
||||||
if (cliOptions.plugins) await PluginManager.Instance.registerPluginsAndThemes()
|
|
||||||
|
|
||||||
LiveManager.Instance.init()
|
LiveManager.Instance.init()
|
||||||
if (CONFIG.LIVE.ENABLED) LiveManager.Instance.run()
|
if (CONFIG.LIVE.ENABLED) LiveManager.Instance.run()
|
||||||
|
|
||||||
// Make server listening
|
// 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('HTTP server listening on %s:%d', hostname, port)
|
||||||
logger.info('Web server: %s', WEBSERVER.URL)
|
logger.info('Web server: %s', WEBSERVER.URL)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user