Node.js 404从Angular调用Rest服务时出错

Node.js 404从Angular调用Rest服务时出错,node.js,httpserver,Node.js,Httpserver,当我在浏览器上运行服务器时,它显示未找到响应。我试过Firefox、Safari、Chrome等等,但没有任何改进。它说,响应未定义。当我运行http服务器时,打开页面。它将直接跳转到文件夹路径并在本地访问Html,但服务器未提供服务 这是我的代码: mod.controller('contacts',contacts); function contacts(contactsdata){ contactsdata.getcontacts() .then(function(data)

当我在浏览器上运行服务器时,它显示未找到响应。我试过Firefox、Safari、Chrome等等,但没有任何改进。它说,响应未定义。当我运行http服务器时,打开页面。它将直接跳转到文件夹路径并在本地访问Html,但服务器未提供服务

这是我的代码:

mod.controller('contacts',contacts);
function contacts(contactsdata){ 
contactsdata.getcontacts()      
.then(function(data){
    this.contacts = data;
})
mod.service("contactsdata",function($http){   
   this.getcontacts = function(){               
        var execute1 = $http.get('http://localhost:3000/contactsinfo')
        var execute2 = execute1.then(function(response){
                return response.data;
            });
                return execute2;
        }
});