Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Replaced broken Connect with forced Express.

  • Loading branch information...
commit fdc60358dfc9c39e752affd3328707db95e2d082 1 parent aecd326
Daniel Shaw authored June 09, 2012
8  examples/stock-quotes/Readme.md
Source Rendered
... ...
@@ -1,9 +1,15 @@
1 1
 # Stock Quote Stream powered by socket.io-announce, managed by mixture
2 2
 
3 3
 ### Setup
  4
+
4 5
 Runs on Node.js v0.5.9+.
5 6
 
6  
-* `npm install`
  7
+    npm install
  8
+
  9
+Note: If you're running Node v0.7+ you might have to run:
  10
+
  11
+    npm install express --force
7 12
 
8 13
 ### Managed mixed cluster
  14
+
9 15
 * `node . [n]` - manage all processes, creating a data stream and n socket.io apps. defaults to 4.
7  examples/stock-quotes/app.js
... ...
@@ -1,16 +1,15 @@
1  
-var path = require('path')
2  
-  , connect = require('connect')
  1
+var express = require('express')
3 2
   , sio = require('socket.io')
4 3
   , RedisStore = sio.RedisStore
5 4
 
6 5
 var port = process.argv[2] || 8880
7 6
   , id = process.argv[3] || 0
8 7
   , delay = process.argv[4] || 800
9  
-  , app = connect.createServer(connect.static(path.join(__dirname, './')))
  8
+  , app = app = express.createServer(express.static(__dirname + '/.'))
10 9
   , io = sio.listen(app)
11 10
 
12 11
 io.configure(function () {
13  
- io.set('store', new RedisStore({ nodeId: function () { return id } }))
  12
+io.set('store', new RedisStore({ nodeId: function () { return id } }))
14 13
 })
15 14
 
16 15
 io.sockets.on('connection', function (socket) {
0  examples/stock-quotes/index.js → examples/stock-quotes/mix.js
File renamed without changes
37  examples/stock-quotes/package.json
... ...
@@ -1,14 +1,27 @@
1 1
 {
2  
-    "name": "stock-quotes-example"
3  
-  , "version": "0.1.1"
4  
-  , "description": "Socket.io-announce Sample App: Stock Quote Stream"
5  
-  , "author": "Daniel D. Shaw <dshaw@dshaw.com> (http://dshaw.com)"
6  
-  , "keywords": ["mixture", "socket.io", "socket.io-announce", "redisstore", "redis"]
7  
-  , "main": "index.js"
8  
-  , "dependencies": {
9  
-      "connect": ">= 1.7.2"
10  
-    , "socket.io": ">= 0.8.5"
11  
-    , "socket.io-announce": ">= 0.1.0"
12  
-    }
13  
-  , "engines": { "node": ">= 0.5.9" }
  2
+  "name": "stock-quotes-example",
  3
+  "version": "0.1.1",
  4
+  "description": "Socket.io-announce Sample App: Stock Quote Stream",
  5
+  "keywords": [
  6
+    "mixture",
  7
+    "socket.io",
  8
+    "socket.io-announce",
  9
+    "redisstore",
  10
+    "redis"
  11
+  ],
  12
+  "author": "Daniel D. Shaw <dshaw@dshaw.com> (http://dshaw.com)",
  13
+  "license": "MIT",
  14
+  "main": "mix",
  15
+  "scripts": {
  16
+    "start": "node ."
  17
+  },
  18
+  "dependencies": {
  19
+    "mixture": "~0.1.0",
  20
+    "express": "~2.5.9",
  21
+    "socket.io": "https://github.com/dshaw/socket.io/tarball/patch/redis71",
  22
+    "socket.io-announce": "https://github.com/dshaw/socket.io-announce/tarball/patch/redis71"
  23
+  },
  24
+  "engines": {
  25
+    "node": ">= 0.5.9"
  26
+  }
14 27
 }

0 notes on commit fdc6035

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