aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-21 18:29:28 +0200
committerChocobozzz <me@florianbigard.com>2018-06-21 18:36:08 +0200
commit23687332e6d7972c6a0eee30ce9056e45dec022b (patch)
treee29e6128582e69ca815f294aa9c269dcc20ff372 /server.ts
parent2336a0e7fb5d3d4c6d1489e6882b1fa24975d8c7 (diff)
downloadPeerTube-23687332e6d7972c6a0eee30ce9056e45dec022b.tar.gz
PeerTube-23687332e6d7972c6a0eee30ce9056e45dec022b.tar.zst
PeerTube-23687332e6d7972c6a0eee30ce9056e45dec022b.zip
Improve update host script and add warning if AP urls are invalid
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts11
1 files changed, 8 insertions, 3 deletions
diff --git a/server.ts b/server.ts
index ef89ff5f6..f756bf9d4 100644
--- a/server.ts
+++ b/server.ts
@@ -1,6 +1,4 @@
1// FIXME: https://github.com/nodejs/node/pull/16853 1// FIXME: https://github.com/nodejs/node/pull/16853
2import { ScheduleVideoUpdateModel } from './server/models/video/schedule-video-update'
3
4require('tls').DEFAULT_ECDH_CURVE = 'auto' 2require('tls').DEFAULT_ECDH_CURVE = 'auto'
5 3
6import { isTestInstance } from './server/helpers/core-utils' 4import { isTestInstance } from './server/helpers/core-utils'
@@ -26,7 +24,7 @@ process.title = 'peertube'
26const app = express() 24const app = express()
27 25
28// ----------- Core checker ----------- 26// ----------- Core checker -----------
29import { checkMissedConfig, checkFFmpeg, checkConfig } from './server/initializers/checker' 27import { checkMissedConfig, checkFFmpeg, checkConfig, checkActivityPubUrls } from './server/initializers/checker'
30 28
31// Do not use barrels because we don't want to load all modules here (we need to initialize database first) 29// Do not use barrels because we don't want to load all modules here (we need to initialize database first)
32import { logger } from './server/helpers/logger' 30import { logger } from './server/helpers/logger'
@@ -191,6 +189,13 @@ async function startApplication () {
191 189
192 await installApplication() 190 await installApplication()
193 191
192 // Check activity pub urls are valid
193 checkActivityPubUrls()
194 .catch(err => {
195 logger.error('Error in ActivityPub URLs checker.', { err })
196 process.exit(-1)
197 })
198
194 // Email initialization 199 // Email initialization
195 Emailer.Instance.init() 200 Emailer.Instance.init()
196 await Emailer.Instance.checkConnectionOrDie() 201 await Emailer.Instance.checkConnectionOrDie()