Permalink
Browse files

Replaced broken Connect with forced Express.

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

0 comments on commit fdc6035

Please sign in to comment.