一、socket.io指定客户端html文件所用到的sendFile()方法中的文件路径必须是绝对路径,而且要符合一定规则:

app.get('/',function(req,res){
    res.sendFile('D:\\\\angular-vmaer-0812\\\\socket\\index.html');
});

sendfile可以用相对路径

posted on 2014-08-15 15:47  狂流  阅读(350)  评论(0编辑  收藏  举报