0
I am trying to start the socket.io service, but error appears Cannot GET/
my server.js is like this
var socket = require( './node_modules/socket.io' );
var express = require('./node_modules/express');
var app = express();
var server = require('http').createServer(app);
var io = socket.listen( server );
var port = process.env.PORT || 3000;
var users = [];
server.listen(port, function () {
console.log('Server listening on port %d', port);
});
When running Node server.js it starts the service, but which one I try to access the Cannot GET url/
It worked, but now I can not access the application... only when I put it on the server, accessing localhost/chat, then runs, but it is not in real time...
– Yuri Rodrigues
What do you mean? You have a page for example: index.html that you want to see in your browser?
– Miguel
I’ll edit according to what I think is necessary
– Miguel
That, I have a chat, ta working now, but only when I access it by Wamp, and when I tried to access by localhost:3000 was cannot get, now it does not appear but the error, but the page is blank.
– Yuri Rodrigues
give me a few minutes.
– Miguel
I edited on top, see if it solves
– Miguel