http.createServer(onRequest).listen(httpPort);
function onRequest (request, response) {
// stuff for serving files
}
and another function for serving socket.io:
io.sockets.on('connection', function (socket) {
// stuff for handling events
}
and these two are called in my index.js , Do you think I need to change this architecture?