Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

我尝试修改一下 #43

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions talk-account/client/controllers/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ recorder = require 'actions-recorder'

if typeof window isnt 'undefined'
cookie = require 'cookie_js'
cookie = cookie.cookie;

config = require '../config'
actions = require '../actions'
Expand Down
20 changes: 11 additions & 9 deletions talk-account/config/default.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
countries = require './util/countries'

domain_str = "abc.test.com";

module.exports =
env: 'static'
debug: true
Expand All @@ -8,16 +10,16 @@ module.exports =
webpackDevPort: 8011
useCDN: no
checkToken: 'Check token for heartbeat'
resourceDomain: 'http://localhost:7001/account'
resourceDomain: "http://#{domain_str}/account"
useAnalytics: no
# URL
accountUrl: 'http://localhost:7001/account'
siteUrl: 'http://localhost:7001'
weiboLogin: "http://localhost:7001/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/weibo/landing'}",
firimLogin: "http://localhost:7001/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/firim/landing'}",
githubLogin: "http://localhost:7001/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://localhost:7001/v2/github/landing'}",
trelloLogin: "http://localhost:7001/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/trello/landing'}",
teambitionLogin: "http://localhost:7001/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/teambtion/landing'}",
accountUrl: "http://#{domain_str}/account"
siteUrl: "http://#{domain_str}"
weiboLogin: "http://#{domain_str}/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/weibo/landing'}",
firimLogin: "http://#{domain_str}/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/firim/landing'}",
githubLogin: "http://#{domain_str}/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/github/landing'}",
trelloLogin: "http://#{domain_str}/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/trello/landing'}",
teambitionLogin: "http://#{domain_str}/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/teambtion/landing'}",
# Cookies
cookieDomain: '.localhost'
accountCookieId: 'aid'
Expand All @@ -27,7 +29,7 @@ module.exports =
mongo:
address: 'mongodb://localhost:27017/talk_account'
redis:
host: 'localhost'
host: '10.10.10.1'
# Client
client:
countries: countries
24 changes: 13 additions & 11 deletions talk-api2x/config/default.coffee
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
path = require 'path'

domain_str = "abc.test.com";

module.exports = config =
debug: true
apiHost: 'localhost:7001'
apiHost: domain_str
accountId: 'aid'
apiVersion: 'v2'
webHost: 'localhost:7001'
webHost: domain_str
sessionDomain: '.localhost'
guestHost: 'localhost:7001'
guestHost: domain_str
schema: 'http'
mongodb: 'mongodb://localhost:27017/talk'
redisHost: 'localhost'
redisHost: '10.10.10.1'
redisPort: 6379
redisDb: 0
snapper:
pub: [6379, 'localhost']
pub: [6379, '10.10.10.1']
clientId: 'Client id of snapper'
clientSecret: 'Client secret of snapper'
channelPrefix: 'snapper'
host: 'localhost:7001/snapper' # For test
talkAccountApiUrl: 'http://localhost:7001/account'
talkAccountPageUrl: 'http://localhost:7001/page'
host: "#{domain_str}/snapper" # For test
talkAccountApiUrl: "http://#{domain_str}/account"
talkAccountPageUrl: "http://#{domain_str}/page"
cdnPrefix: 'https://dn-talk.oss.aliyuncs.com'
checkToken: 'Check token for heartbeat statement'
serviceConfig:
apiHost: 'http://localhost:7001/v2'
cdnPrefix: "http://localhost:7001/v2/services-static"
talkAccountApiUrl: 'http://localhost:7001/account'
apiHost: "http://#{domain_str}/v2"
cdnPrefix: "http://#{domain_str}/v2/services-static"
talkAccountApiUrl: "http://#{domain_str}/account"
teambition:
clientSecret: 'Your teambition application secret'
host: 'https://www.teambition.com'
Expand Down
5 changes: 3 additions & 2 deletions talk-snapper/config/default.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports =
port: process.env.PORT or 7001
prefix: '/snapper/socket'
# Configure redis pub/sub instance and channel prefix
pub: [6379, "localhost"]
sub: [6379, "localhost"]
pub: [6379, "10.10.10.1"]
sub: [6379, "10.10.10.1"]
channelPrefix: 'snapper'

24 changes: 13 additions & 11 deletions talk-web/config/default.coffee
Original file line number Diff line number Diff line change
@@ -1,27 +1,29 @@

isGuest = process.env.APP is 'guest'

domain_str = "abc.test.com";

module.exports =
env: 'static',
isGuest: isGuest
version: require('../package.json').version
apiHost: if isGuest then '/api' else '/v2'
sockHost: 'http://localhost:7001/snapper',
sockHost: "http://#{domain_str}/snapper",
inteUrl: 'http://account.project.ci',
accountUrl: 'http://localhost:7001/account',
accountUrl: "http://#{domain_str}/account",
domainUrl: 'http://localhost:8081',
uploadUrl: 'https://striker.teambition.net',
cookieDomain: '.localhost'
pdfStaticHost: 'http://dn-static.oss.aliyuncs.com/pdf-viewer/v0.3.0/index.html',
loginUrl: 'http://localhost:7001/account',
logoutUrl: 'http://localhost:7001/account',
weiboLogin: "http://localhost:7001/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/weibo/landing'}",
firimLogin: "http://localhost:7001/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/firim/landing'}",
githubLogin: "http://localhost:7001/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/github/landing'}",
trelloLogin: "http://localhost:7001/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/trello/landing'}",
teambitionLogin: "http://localhost:7001/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://localhost:7001/v2/union/teambtion/landing'}",
feedbackUrl: 'http://localhost:7001/v2/services/webhook/4d76d92134e727620fce35d7d7c5b1c43921101e'
windowOnErrorUrl: 'http://localhost:7001/v2/services/webhook/14b30bc73f75044e7500721dee5e985e58049382'
loginUrl: "http://#{domain_str}/account",
logoutUrl: "http://#{domain_str}/account",
weiboLogin: "http://#{domain_str}/account/union/weibo?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/weibo/landing'}",
firimLogin: "http://#{domain_str}/account/union/firim?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/firim/landing'}",
githubLogin: "http://#{domain_str}/account/union/github?method=bind&service=talk&nologin=1&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/github/landing'}",
trelloLogin: "http://#{domain_str}/account/union/trello?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/trello/landing'}",
teambitionLogin: "http://#{domain_str}/account/union/teambition?method=bind&next_url=#{encodeURIComponent 'http://'+domain_str+'/v2/union/teambtion/landing'}",
feedbackUrl: "http://#{domain_str}/v2/services/webhook/4d76d92134e727620fce35d7d7c5b1c43921101e"
windowOnErrorUrl: "http://#{domain_str}/v2/services/webhook/14b30bc73f75044e7500721dee5e985e58049382"
webpackDevPort: 8081,
cdn: 'https://dn-st.b0.upaiyun.com'
isMinified: no
Expand Down