Nodejs and socket.io using index.php instead of index.html

Using the simple chat tutorial from the socket.io website I set up a server with nodejs and socket.io, but I wanted to be able to use it with my preexisting webpage, which has php in it and is therefor a .php file. When I changed the .html to .php I was not able to get the php file loaded like the html file does. I get: Error: ENOENT, stat '/index.php' Any ideas?

var app = require('express')();
var http = require('http').Server(app);
var io = require('socket.io')(http);

app.get('/', function(req, res){
  res.sendfile('index.php');
});

io.on('connection', function(socket){
  socket.on('chat message', function(msg){
    io.emit('chat message', msg);
  });
});

http.listen(3000, function(){
  console.log('listening on *:3000');
});

Edit: Forgot to change "index.html" to "index.php" in the code above, it is now correct.

ENOENT is Error NO ENTry.

res.sendfile(__dirname + '/index.html');

If you change extansion file, you must to update filename in folder and in your code (js file).

But Nodejs can't execute your php code.

How to integrate nodeJS + Socket.IO and PHP?