File tree 3 files changed +19
-12
lines changed
app/templates/server/config
3 files changed +19
-12
lines changed Original file line number Diff line number Diff line change 6
6
// This file should not be tracked by git.
7
7
8
8
module . exports = {
9
- SESSION_SECRET : "<%= _.slugify(appname) + '-secret' %>" ,
10
- FACEBOOK_ID : "app-id" ,
11
- FACEBOOK_SECRET : "secret" ,
12
- TWITTER_ID : "app-id" ,
13
- TWITTER_SECRET : "secret" ,
14
- GOOGLE_ID : "app-id" ,
15
- GOOGLE_SECRET : "secret" ,
9
+ DOMAIN : 'http://localhost:9000' ,
10
+ SESSION_SECRET : "<%= _.slugify(appname) + '-secret' %>" ,
11
+
12
+ FACEBOOK_ID : 'app-id' ,
13
+ FACEBOOK_SECRET : 'secret' ,
14
+
15
+ TWITTER_ID : 'app-id' ,
16
+ TWITTER_SECRET : 'secret' ,
17
+
18
+ GOOGLE_ID : 'app-id' ,
19
+ GOOGLE_SECRET : 'secret' ,
20
+
16
21
// Control debug level for modules using visionmedia/debug
17
22
// DEBUG: ""
18
23
} ;
Original file line number Diff line number Diff line change @@ -44,19 +44,19 @@ var all = {
44
44
facebook : {
45
45
clientID : process . env . FACEBOOK_ID || 'id' ,
46
46
clientSecret : process . env . FACEBOOK_SECRET || 'secret' ,
47
- callbackURL : 'http://localhost:9000 /auth/facebook/callback'
47
+ callbackURL : process . env . DOMAIN + ' /auth/facebook/callback'
48
48
} ,
49
49
< % } % > < % if ( filters . twitterAuth ) { % >
50
50
twitter : {
51
51
clientID : process . env . TWITTER_ID || 'id' ,
52
52
clientSecret : process . env . TWITTER_SECRET || 'secret' ,
53
- callbackURL : 'http://localhost:9000 /auth/twitter/callback'
53
+ callbackURL : process . env . DOMAIN + ' /auth/twitter/callback'
54
54
} ,
55
55
< % } % > < % if ( filters . googleAuth ) { % >
56
56
google : {
57
57
clientID : process . env . GOOGLE_ID || 'id' ,
58
58
clientSecret : process . env . GOOGLE_SECRET || 'secret' ,
59
- callbackURL : 'http://localhost:9000 /auth/google/callback'
59
+ callbackURL : process . env . DOMAIN + ' /auth/google/callback'
60
60
} < % } % >
61
61
} ;
62
62
Original file line number Diff line number Diff line change @@ -38,8 +38,10 @@ module.exports = function (socketio) {
38
38
// }));
39
39
40
40
socketio . on ( 'connection' , function ( socket ) {
41
- socket . address = socket . handshake . address . address + ':' +
42
- socket . handshake . address . port ;
41
+ socket . address = socket . handshake . address !== null ?
42
+ socket . handshake . address . address + ':' + socket . handshake . address . port :
43
+ process . env . DOMAIN ;
44
+
43
45
socket . connectedAt = new Date ( ) ;
44
46
45
47
// Call onDisconnect.
You can’t perform that action at this time.
0 commit comments