Skip to content

Commit 209509e

Browse files
committed
Added some configuration
1 parent 54bdbf4 commit 209509e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

app.js

+15-1
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,23 @@ ss.client.templateEngine.use(require('ss-hogan'));
2222
// Minimize and pack assets if you type: SS_ENV=production node app.js
2323
if (ss.env === 'production') ss.client.packAssets();
2424

25+
var config = {
26+
redis: {
27+
host: 'localhost',
28+
port: 6379,
29+
db: 4
30+
},
31+
port: 3000
32+
};
33+
34+
35+
ss.session.store.use('redis', config.redis);
36+
ss.publish.transport.use('redis', config.redis);
37+
38+
2539
// Start web server
2640
var server = http.Server(ss.http.middleware);
27-
server.listen(3000);
41+
server.listen(process.env.PORT || config.port);
2842

2943
// Start SocketStream
3044
ss.start(server);

0 commit comments

Comments
 (0)