Skip to content

Instantly share code, notes, and snippets.

View JulioWar's full-sized avatar
👨‍💻
I may be slow to respond.

Julio Guerra JulioWar

👨‍💻
I may be slow to respond.
  • Costa Rica
View GitHub Profile
@laterbreh
laterbreh / Express 4 and Socket.io: Passing socket.io to routes - app.js
Last active August 15, 2023 13:58
Express 4 and Socket.io: Passing socket.io to routes.
var app = express();
app.io = require('socket.io')();
var routes = require('./routes/index')(app.io);
app.use('/', routes);