code is as follows
app.get ("/ getToal",function (req,res) {
db.query("select count(*) as totalNum from t_package",[],function(result,fields){
res.send({code: 200, message: "",data:result});
})
});
the local service written in node is not routed and can respond to ajax, with post request but the get request does not execute the ajax request but goes directly to the project to find the corresponding file without executing the interface.
just replace the get request with post. Why? Contact node, for advice for the first time