3
rated 0 times
[
6]
[
3]
/ answers: 1 / hits: 39594
/ 12 Years ago, tue, april 17, 2012, 12:00:00
For some reason my node server cannot serve the route /socket.io/socket.io.js
, I always get a 404 error.
I tried compiling different node versions (current is 0.6.13 which also runs on server, where it actually works).
From the app.js I get info: socket.io started
and no error when trying to call the socket.io.js.
I try it from localhost and port 8000 and I use the express framework
This is the code from app.js:
var express = require('express')
, app = require('express').createServer()
, io = require('socket.io').listen(app, { log: true });
app.listen(8000);
app.configure(function() {
app.use(express.static(__dirname + '/public'));
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});
io.sockets.on('connection', function (socket) {
// all other stuff here
More From » node.js