以角度获取请求:
$http.get('/twitter')
.success(function(response) {
console.log("here is the response: ", response);
})
.error(function(err) {
console.log("oh no something went wrong: ", err);
});
在node / express中路由:
app.get('/twitter', function(req,res) {
console.log("at the twitter endpoints");
res.send("at the twitter endpoint");
});
不确定为什么我的路由工作不起作用,但我一直无法获得/ twitter错误