Created
November 30, 2012 21:32
-
-
Save blakmatrix/4178803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
app.js | |
====== | |
var routes = require('./routes') | |
, app = express() | |
, server = http.createServer(app) | |
, io = socketio.listen(server); | |
app.get('/events/:shortname', routes.event); | |
routes/index.js | |
=============== | |
var event = exports.event = function(req, res) { | |
// I want access to "io" here! | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment