aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-07-21 15:56:49 +0200
committerChocobozzz <me@florianbigard.com>2021-07-21 15:56:49 +0200
commite19fdf5775aa43fcc766308cbc4dcd66a5d0776e (patch)
tree7b323fec9cfde928779c52614fe394704732d4e3 /server.ts
parenta24bd1ed41b43790bab6ba789580bb4e85f07d85 (diff)
downloadPeerTube-e19fdf5775aa43fcc766308cbc4dcd66a5d0776e.tar.gz
PeerTube-e19fdf5775aa43fcc766308cbc4dcd66a5d0776e.tar.zst
PeerTube-e19fdf5775aa43fcc766308cbc4dcd66a5d0776e.zip
Register plugins when peertube server is ready
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts12
1 files changed, 9 insertions, 3 deletions
diff --git a/server.ts b/server.ts
index 582321a5b..bfc7ee145 100644
--- a/server.ts
+++ b/server.ts
@@ -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