diff options
Diffstat (limited to 'server.ts')
-rw-r--r-- | server.ts | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -1,12 +1,18 @@ | |||
1 | require('module-alias/register') | 1 | import { resolve } from 'path' |
2 | 2 | ||
3 | // FIXME: https://github.com/nodejs/node/pull/16853 | 3 | const tsConfig = require('./tsconfig.json') |
4 | import { PluginManager } from './server/lib/plugins/plugin-manager' | 4 | const tsConfigPaths = require('tsconfig-paths') |
5 | |||
6 | // Thanks: https://github.com/dividab/tsconfig-paths/issues/75#issuecomment-458936883 | ||
7 | tsConfigPaths.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 | ||
6 | require('tls').DEFAULT_ECDH_CURVE = 'auto' | 13 | require('tls').DEFAULT_ECDH_CURVE = 'auto' |
7 | 14 | ||
8 | import { isTestInstance } from './server/helpers/core-utils' | 15 | import { isTestInstance } from './server/helpers/core-utils' |
9 | |||
10 | if (isTestInstance()) { | 16 | if (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' | |||
121 | import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' | 127 | import { updateStreamingPlaylistsInfohashesIfNeeded } from './server/lib/hls' |
122 | import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' | 128 | import { PluginsCheckScheduler } from './server/lib/schedulers/plugins-check-scheduler' |
123 | import { Hooks } from './server/lib/plugins/hooks' | 129 | import { Hooks } from './server/lib/plugins/hooks' |
130 | import { PluginManager } from './server/lib/plugins/plugin-manager' | ||
124 | 131 | ||
125 | // ----------- Command line ----------- | 132 | // ----------- Command line ----------- |
126 | 133 | ||