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