diff options
author | Chocobozzz <me@florianbigard.com> | 2019-04-11 11:33:44 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-04-11 13:45:39 +0200 |
commit | 6dd9de95dfa39bd5c1faed00d1dbd52cd112bae0 (patch) | |
tree | b47de7efb8c6c611c63a15a971c6125a278f547a /server/initializers/checker-after-init.ts | |
parent | 2c3abc4fa796555eb7d25f416c4f41ab3e3ad8ca (diff) | |
download | PeerTube-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.ts | 5 |
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' | |||
4 | import { ApplicationModel } from '../models/application/application' | 4 | import { ApplicationModel } from '../models/application/application' |
5 | import { OAuthClientModel } from '../models/oauth/oauth-client' | 5 | import { OAuthClientModel } from '../models/oauth/oauth-client' |
6 | import { parse } from 'url' | 6 | import { parse } from 'url' |
7 | import { CONFIG } from './constants' | 7 | import { CONFIG } from './config' |
8 | import { logger } from '../helpers/logger' | 8 | import { logger } from '../helpers/logger' |
9 | import { getServerActor } from '../helpers/utils' | 9 | import { getServerActor } from '../helpers/utils' |
10 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' | 10 | import { RecentlyAddedStrategy } from '../../shared/models/redundancy' |
11 | import { isArray } from '../helpers/custom-validators/misc' | 11 | import { isArray } from '../helpers/custom-validators/misc' |
12 | import { uniq } from 'lodash' | 12 | import { uniq } from 'lodash' |
13 | import { Emailer } from '../lib/emailer' | 13 | import { Emailer } from '../lib/emailer' |
14 | import { WEBSERVER } from './constants' | ||
14 | 15 | ||
15 | async function checkActivityPubUrls () { | 16 | async 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 | ||