mirror of
https://github.com/wassname/talk.git
synced 2026-07-16 11:22:16 +08:00
Merge branch 'master' into next
This commit is contained in:
@@ -15,6 +15,8 @@ const uniq = require('lodash/uniq');
|
||||
const ms = require('ms');
|
||||
const debug = require('debug')('talk:config');
|
||||
|
||||
const localAddress = require('ip').address('private');
|
||||
|
||||
//==============================================================================
|
||||
// CONFIG INITIALIZATION
|
||||
//==============================================================================
|
||||
@@ -238,10 +240,10 @@ const CONFIG = {
|
||||
|
||||
if (process.env.NODE_ENV === 'test') {
|
||||
if (!CONFIG.ROOT_URL) {
|
||||
CONFIG.ROOT_URL = 'http://localhost:3001';
|
||||
CONFIG.ROOT_URL = `http://${localAddress}:3001`;
|
||||
}
|
||||
if (!CONFIG.STATIC_URL) {
|
||||
CONFIG.STATIC_URI = 'http://localhost:3001';
|
||||
CONFIG.STATIC_URI = `http://${localAddress}:3001`;
|
||||
}
|
||||
} else if (!CONFIG.ROOT_URL) {
|
||||
throw new Error('TALK_ROOT_URL must be provided');
|
||||
|
||||
Reference in New Issue
Block a user