node.js - Node JS Socket.io -
i have been struggling around have socket.io npm module setup , browser able interface end nodejs script. not sure going wrong. remeber seeing messages in console that: "socket.io .. started .." but nothing happens now. below nodejs code: var express = require('express'); var server = require('http').createserver(express); var path = require('path'); var favicon = require('static-favicon'); var logger = require('morgan'); var cookieparser = require('cookie-parser'); var bodyparser = require('body-parser'); global.socket = require('socket.io')(server); //global.socket = require('socket.io').listen(80, {log:true}); //socket.listen(80, {log:true}); in index.js file have function catches socket.io incoming connections. when try below url browser: http://localhost:3000/socket.io/socket.io.js i error message: error: failed lookup view "error" in views directory "c:\amr\public...