Socket.io error hooking into express.js

You should use http module:

var http = require('http');
var express = require('express'),
    app = module.exports.app = express();

var server = http.createServer(app);
var io = require('socket.io').listen(server);  //pass a http.Server instance
server.listen(80);  //listen on port 80

//now you can use app and io

More details you can find in a documentation: http://socket.io/docs/#using-with-express-3/4

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)