aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers
diff options
context:
space:
mode:
Diffstat (limited to 'server/initializers')
-rw-r--r--server/initializers/checker-before-init.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/server/initializers/checker-before-init.ts b/server/initializers/checker-before-init.ts
index c94bca2f8..55bc820f5 100644
--- a/server/initializers/checker-before-init.ts
+++ b/server/initializers/checker-before-init.ts
@@ -1,5 +1,6 @@
1import * as config from 'config' 1import * as config from 'config'
2import { promisify0 } from '../helpers/core-utils' 2import { promisify0 } from '../helpers/core-utils'
3import { logger } from '../helpers/logger'
3 4
4// ONLY USE CORE MODULES IN THIS FILE! 5// ONLY USE CORE MODULES IN THIS FILE!
5 6
@@ -109,10 +110,23 @@ async function checkFFmpegEncoders (): Promise<Map<string, boolean>> {
109 return supportedOptionalEncoders 110 return supportedOptionalEncoders
110} 111}
111 112
113function checkNodeVersion () {
114 const v = process.version
115 const majorString = v.split('.')[0].replace('v', '')
116 const major = parseInt(majorString, 10)
117
118 logger.debug('Checking NodeJS version %s.', v)
119
120 if (major < 10) {
121 logger.warn('Your NodeJS version %s is deprecated. Please use Node 10.', v)
122 }
123}
124
112// --------------------------------------------------------------------------- 125// ---------------------------------------------------------------------------
113 126
114export { 127export {
115 checkFFmpeg, 128 checkFFmpeg,
116 checkFFmpegEncoders, 129 checkFFmpegEncoders,
117 checkMissedConfig 130 checkMissedConfig,
131 checkNodeVersion
118} 132}