aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/initializers/checker-after-init.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2019-04-11 11:33:44 +0200
committerChocobozzz <me@florianbigard.com>2019-04-11 13:45:39 +0200
commit6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 (patch)
treeb47de7efb8c6c611c63a15a971c6125a278f547a /server/initializers/checker-after-init.ts
parent2c3abc4fa796555eb7d25f416c4f41ab3e3ad8ca (diff)
downloadPeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.gz
PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.tar.zst
PeerTube-6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0.zip
Move config in its own file
Diffstat (limited to 'server/initializers/checker-after-init.ts')
-rw-r--r--server/initializers/checker-after-init.ts5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/initializers/checker-after-init.ts b/server/initializers/checker-after-init.ts
index 85f752284..db3115085 100644
--- a/server/initializers/checker-after-init.ts
+++ b/server/initializers/checker-after-init.ts
@@ -4,19 +4,20 @@ import { UserModel } from '../models/account/user'
4import { ApplicationModel } from '../models/application/application' 4import { ApplicationModel } from '../models/application/application'
5import { OAuthClientModel } from '../models/oauth/oauth-client' 5import { OAuthClientModel } from '../models/oauth/oauth-client'
6import { parse } from 'url' 6import { parse } from 'url'
7import { CONFIG } from './constants' 7import { CONFIG } from './config'
8import { logger } from '../helpers/logger' 8import { logger } from '../helpers/logger'
9import { getServerActor } from '../helpers/utils' 9import { getServerActor } from '../helpers/utils'
10import { RecentlyAddedStrategy } from '../../shared/models/redundancy' 10import { RecentlyAddedStrategy } from '../../shared/models/redundancy'
11import { isArray } from '../helpers/custom-validators/misc' 11import { isArray } from '../helpers/custom-validators/misc'
12import { uniq } from 'lodash' 12import { uniq } from 'lodash'
13import { Emailer } from '../lib/emailer' 13import { Emailer } from '../lib/emailer'
14import { WEBSERVER } from './constants'
14 15
15async function checkActivityPubUrls () { 16async function checkActivityPubUrls () {
16 const actor = await getServerActor() 17 const actor = await getServerActor()
17 18
18 const parsed = parse(actor.url) 19 const parsed = parse(actor.url)
19 if (CONFIG.WEBSERVER.HOST !== parsed.host) { 20 if (WEBSERVER.HOST !== parsed.host) {
20 const NODE_ENV = config.util.getEnv('NODE_ENV') 21 const NODE_ENV = config.util.getEnv('NODE_ENV')
21 const NODE_CONFIG_DIR = config.util.getEnv('NODE_CONFIG_DIR') 22 const NODE_CONFIG_DIR = config.util.getEnv('NODE_CONFIG_DIR')
22 23