Hello Experts,
I am a new bee to node.js. I have installed node server in centos machine
and its IP address is 192.168.1.2.
I tried with simple group chat using node.js. I was able to develop that
and have hosted in centos server (VMware) in the path /var/www/html/Chat.
Below is my app.js
var express = require('express'),
app = express(),
server = require('http').createServer(app),
io = require('socket.io').listen(server),
users = {};
server.listen(3000');
console.log('Server running');
app.get('/', function(req, res){
res.sendfile(__dirname + '/index.html');
});
I tested it by accessing it via http://localhost:3000 and it worked
perfiectly. But same thing if i try accessing via IP address i.e.
192.168.1.2:3000 from Host machine (windows - 192.168.1.6) i get the error
as "oops could not found" . if i try access with url 192.168.1.2/Chat i was
able to see the index.html file but nothing works i get the below error if
i inspect (google chrome).
Failed to load resource: the server responded with a status of 404 (Not
Found) http://192.168.1.2/Chat/socket.io/socket.io.js
Uncaught ReferenceError: io is not defined (index):53<http://192.168.1.2/Chat/>
Thanks,
Srivatsa
--
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en
---
You received this message because you are subscribed to the Google Groups
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.