aboutsummaryrefslogtreecommitdiffhomepage
path: root/server.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server.ts')
-rw-r--r--server.ts15
1 files changed, 11 insertions, 4 deletions
diff --git a/server.ts b/server.ts
index 5cfa09445..b49d10344 100644
--- a/server.ts
+++ b/server.ts
@@ -1,12 +1,18 @@
1require('module-alias/register') 1import { resolve } from 'path'
2 2
3// FIXME: https://github.com/nodejs/node/pull/16853 3const tsConfig = require('./tsconfig.json')
4import { PluginManager } from './server/lib/plugins/plugin-manager' 4const tsConfigPaths = require('tsconfig-paths')
5
6// Thanks: https://github.com/dividab/tsconfig-paths/issues/75#issuecomment-458936883
7tsConfigPaths.register({
8 baseUrl: resolve(tsConfig.compilerOptions.baseUrl || '', tsConfig.compilerOptions.outDir || ''),
9 paths: tsConfig.compilerOptions.paths
10})
5 11
12// FIXME: https://github.com/nodejs/node/pull/16853
6require('tls').DEFAULT_ECDH_CURVE = 'auto' 13require('tls').DEFAULT_ECDH_CURVE = 'auto'
7 14
8import { isTestInstance } from './server/helpers/core-utils' 15import { isTestInstance } from './server/helpers/core-utils'
9
10if (isTestInstance()) { 16if (isTestInstance()) {
11 require('source-map-support').install() 17 require('source-map-support').install()
12} 18}
@@ -121,6 +127,7 @@ import { PeerTubeSocket } from './server/lib/peertube-socket'
121import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' 127import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls'
122import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' 128import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler'
123import { Hooks } from './server/lib/plugins/hooks' 129import { Hooks } from './server/lib/plugins/hooks'
130import { PluginManager } from './server/lib/plugins/plugin-manager'
124 131
125// ----------- Command line ----------- 132// ----------- Command line -----------
126 133