aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts11
1 files changed, 9 insertions, 2 deletions
diff --git a/server.ts b/server.ts
index 00cd87e20..f44202c9a 100644
--- a/server.ts
+++ b/server.ts
@@ -44,7 +44,7 @@ checkFFmpeg(CONFIG)
44 44
45checkNodeVersion() 45checkNodeVersion()
46 46
47import { checkConfig, checkActivityPubUrls } from './server/initializers/checker-after-init' 47import { checkConfig, checkActivityPubUrls, checkFFmpegVersion } from './server/initializers/checker-after-init'
48 48
49const errorMessage = checkConfig() 49const errorMessage = checkConfig()
50if (errorMessage !== null) { 50if (errorMessage !== null) {
@@ -120,6 +120,7 @@ import { isHTTPSignatureDigestValid } from './server/helpers/peertube-crypto'
120import { PeerTubeSocket } from './server/lib/peertube-socket' 120import { PeerTubeSocket } from './server/lib/peertube-socket'
121import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' 121import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls'
122import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' 122import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler'
123import { PeerTubeVersionCheckScheduler } from './server/lib/schedulers/peertube-version-check-scheduler'
123import { Hooks } from './server/lib/plugins/hooks' 124import { Hooks } from './server/lib/plugins/hooks'
124import { PluginManager } from './server/lib/plugins/plugin-manager' 125import { PluginManager } from './server/lib/plugins/plugin-manager'
125import { LiveManager } from './server/lib/live-manager' 126import { LiveManager } from './server/lib/live-manager'
@@ -160,7 +161,9 @@ morgan.token('user-agent', (req: express.Request) => {
160 return req.get('user-agent') 161 return req.get('user-agent')
161}) 162})
162app.use(morgan('combined', { 163app.use(morgan('combined', {
163 stream: { write: logger.info.bind(logger) }, 164 stream: {
165 write: (str: string) => logger.info(str, { tags: [ 'http' ] })
166 },
164 skip: req => CONFIG.LOG.LOG_PING_REQUESTS === false && req.originalUrl === '/api/v1/ping' 167 skip: req => CONFIG.LOG.LOG_PING_REQUESTS === false && req.originalUrl === '/api/v1/ping'
165})) 168}))
166 169
@@ -250,6 +253,9 @@ async function startApplication () {
250 process.exit(-1) 253 process.exit(-1)
251 }) 254 })
252 255
256 checkFFmpegVersion()
257 .catch(err => logger.error('Cannot check ffmpeg version', { err }))
258
253 // Email initialization 259 // Email initialization
254 Emailer.Instance.init() 260 Emailer.Instance.init()
255 261
@@ -272,6 +278,7 @@ async function startApplication () {
272 RemoveOldHistoryScheduler.Instance.enable() 278 RemoveOldHistoryScheduler.Instance.enable()
273 RemoveOldViewsScheduler.Instance.enable() 279 RemoveOldViewsScheduler.Instance.enable()
274 PluginsCheckScheduler.Instance.enable() 280 PluginsCheckScheduler.Instance.enable()
281 PeerTubeVersionCheckScheduler.Instance.enable()
275 AutoFollowIndexInstances.Instance.enable() 282 AutoFollowIndexInstances.Instance.enable()
276 283
277 // Redis initialization 284 // Redis initialization