HTML page not connecting to AWS server

Dennis Dixon asked:

I am trying to connect an html page hosted with my ISP provider with an Amazon Web Services micro-instance server using

I am trying to use the most basic example possible that is provided by the web page:

Here is the client code posted in index.html:

        <title>Webrtc.js Demo</title>
<script src="   /"></script>
  var socket = io.connect(' /server.js:8080');
  socket.on('news', function (data) {
    socket.emit('my other event', { my: 'data' });

Here is the server code posted in my ec2-user directory as server.js:

/*global console*/
var io = require('').listen(8080);
io.sockets.on('connection', function (socket) {
  socket.emit('news', { hello: 'world' });
  socket.on('my other event', function (data) {

When I go to index.html at the bottom of the browser it says it’s trying to connect but I never get a “hello world” in the browser.

Possibly there are certain debugging commands I can use to track down the problem.

Any help would be appreciated.

My answer:

Open port 8080 in your AWS security group.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.