Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert "app: use sticky session"

This reverts commit 1b928a0.
  • Loading branch information...
commit 7d55e1a53f68bfd3eebfc69c1922bfdd0b2c297b 1 parent 1b928a0
Fedor Indutny authored

Showing 2 changed files with 13 additions and 17 deletions. Show diff stats Hide diff stats

  1. +12 15 app.js
  2. +1 2  package.json
27 app.js
@@ -3,27 +3,24 @@ var express = require('express'),
3 3 jade = require('jade'),
4 4 path = require('path'),
5 5 http = require('http'),
6   - sticky = require('sticky-session'),
7 6 app = express();
8 7
9   -sticky(function() {
10   - var app = express(),
11   - server = http.createServer(app);
  8 +var server = http.createServer(app);
12 9
13   - app.use(express.static(path.resolve(__dirname, 'public')));
14   - app.use(express.bodyParser());
15   - app.use(app.router);
  10 +app.use(express.static(path.resolve(__dirname, 'public')));
  11 +app.use(express.bodyParser());
  12 +app.use(app.router);
16 13
17   - app.engine('jade', jade.__express);
  14 +app.engine('jade', jade.__express);
18 15
19   - // Add routes
20   - require('./app/routes').add(app);
  16 +// Add routes
  17 +require('./app/routes').add(app);
21 18
22   - io = io.listen(server);
  19 +io = io.listen(server);
23 20
24   - app.io = io;
  21 +app.io = io;
25 22
26   - return server;
27   -}).listen(process.env.SERVER_PORT || 8080, function() {
28   - console.log('Server started on %d', process.env.SERVER_PORT || 8080);
  23 +server.listen(process.env.SERVER_PORT || 8080, function() {
  24 + var addr = this.address();
  25 + console.log('Server started on %s:%d', addr.address, addr.port);
29 26 });
3  package.json
@@ -8,7 +8,6 @@
8 8 "socket.io": "~0.9.10",
9 9 "marked": "~0.2.5",
10 10 "jade": "~0.27.5",
11   - "redis": "~0.8.1",
12   - "sticky-session": "0.0.5"
  11 + "redis": "~0.8.1"
13 12 }
14 13 }

0 comments on commit 7d55e1a

Please sign in to comment.
Something went wrong with that request. Please try again.