更新 grailed_config.js
This commit is contained in:
parent
bd02388efd
commit
9fd6615491
|
|
@ -1,93 +1,94 @@
|
|||
/**
|
||||
* 部署多端的一些Map
|
||||
*/
|
||||
|
||||
// 与域名相关的配置
|
||||
export const HOST_MAP = {
|
||||
DEFAULT: {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'www.eworldtrade.shop',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.eworldtrade.shop',
|
||||
},
|
||||
|
||||
'192.168.0.127': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'http://',
|
||||
wsProtocol: 'ws://',
|
||||
host: '192.168.0.127:48080',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.eworldtrade.shop',
|
||||
},
|
||||
|
||||
'localhost': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'http://',
|
||||
wsProtocol: 'ws://',
|
||||
host: 'localhost:48080',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.eworldtrade.shop',
|
||||
},
|
||||
|
||||
'new1-www.appsflyer.wiki': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'new1-www.appsflyer.wiki',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://new1-chat.appsflyer.wiki',
|
||||
},
|
||||
|
||||
'www.appsflyer.wiki': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'www.appsflyer.wiki',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.appsflyer.wiki',
|
||||
},
|
||||
|
||||
'www.ottoshop.wiki': {
|
||||
lang: 'tl-tl',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'www.ottoshop.wiki',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.ottoshop.wiki',
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
// 多域名使用同一个配置
|
||||
function addConfigWithMultipleDomain(lang, mainDomain) {
|
||||
for (let subDomain of ['www', 'chat', 'service', 'backend']) {
|
||||
const domain = subDomain + '.' + mainDomain
|
||||
HOST_MAP[domain] = {
|
||||
// 共同部分
|
||||
lang,
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
// -----
|
||||
host: 'www.' + mainDomain,
|
||||
chatUrl: 'https://chat.' + mainDomain,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// e.g.
|
||||
addConfigWithMultipleDomain('it-it', 'veepee-it.com')
|
||||
|
||||
addConfigWithMultipleDomain('fr-fr', 'sharelocalmedia.cc')
|
||||
addConfigWithMultipleDomain('it-it', 'hood-de.cc')
|
||||
addConfigWithMultipleDomain('es-es', 'sharelocalmedia.wiki')
|
||||
|
||||
/**
|
||||
* 部署多端的一些Map
|
||||
*/
|
||||
|
||||
// 与域名相关的配置
|
||||
export const HOST_MAP = {
|
||||
DEFAULT: {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'www.eworldtrade.shop',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.eworldtrade.shop',
|
||||
},
|
||||
|
||||
'192.168.0.127': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'http://',
|
||||
wsProtocol: 'ws://',
|
||||
host: '192.168.0.127:48080',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.eworldtrade.shop',
|
||||
},
|
||||
|
||||
'localhost': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'http://',
|
||||
wsProtocol: 'ws://',
|
||||
host: 'localhost:48080',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.eworldtrade.shop',
|
||||
},
|
||||
|
||||
'new1-www.appsflyer.wiki': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'new1-www.appsflyer.wiki',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://new1-chat.appsflyer.wiki',
|
||||
},
|
||||
|
||||
'www.appsflyer.wiki': {
|
||||
lang: 'uk-gb',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'www.appsflyer.wiki',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.appsflyer.wiki',
|
||||
},
|
||||
|
||||
'www.ottoshop.wiki': {
|
||||
lang: 'tl-tl',
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
host: 'www.ottoshop.wiki',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
chatUrl: 'https://chat.ottoshop.wiki',
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
// 多域名使用同一个配置
|
||||
function addConfigWithMultipleDomain(lang, mainDomain) {
|
||||
for (let subDomain of ['www', 'chat', 'service', 'backend']) {
|
||||
const domain = subDomain + '.' + mainDomain
|
||||
HOST_MAP[domain] = {
|
||||
// 共同部分
|
||||
lang,
|
||||
urlProtocol: 'https://',
|
||||
wsProtocol: 'wss://',
|
||||
appContextPath: '/app-api',
|
||||
adminContextPath: '/admin-api',
|
||||
// -----
|
||||
host: 'www.' + mainDomain,
|
||||
chatUrl: 'https://chat.' + mainDomain,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// e.g.
|
||||
addConfigWithMultipleDomain('it-it', 'veepee-it.com')
|
||||
|
||||
addConfigWithMultipleDomain('fr-fr', 'sharelocalmedia.cc')
|
||||
addConfigWithMultipleDomain('it-it', 'hood-de.cc')
|
||||
addConfigWithMultipleDomain('es-es', 'sharelocalmedia.wiki')
|
||||
addConfigWithMultipleDomain('fr-fr', 'shoparizefr.com')
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue