-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Hello there I'm working with:
Ubutu 14.04
Express 4.10.2
Socket.io 1.3.7
Vagrant
Port fowarding :8001 to Box :80
Port fowarding :8002 to Box :3000
This is my App.js
var express = require('express');
var app = express();
var server = app.listen(3000);
var io = require('socket.io').listen(server);
var http = require('http');
io.on('connection', function(socket){
console.log('a user connected');
socket.on('disconnect', function(){
console.log('user disconnected');
});
});
and this is my index.html
<!doctype html>
<title>Socket.IO chat</title> <style> \* { margin: 0; padding: 0; box-sizing: border-box; } body { font: 13px Helvetica, Arial; } form { background: #000; padding: 3px; position: fixed; bottom: 0; width: 100%; } form input { border: 0; padding: 10px; width: 90%; margin-right: .5%; } form button { width: 9%; background: rgb(130, 224, 255); border: none; padding: 10px; } #messages { list-style-type: none; margin: 0; padding: 0; } #messages li { padding: 5px 10px; } #messages li:nth-child(odd) { background: #eee; } </style>then when I open in the browser the index page I get:
Failed to load resource: the server responded with a status of 404 (Not Found)
http://127.0.0.1:8001/socket.io/?EIO=3&transport=polling&t=1451934295598-10
any idea how to solve it?
Metadata
Metadata
Assignees
Labels
No labels