这是我的代码的NodeJS:没有得到从POST方法响应在对的NodeJS html页面
app.post('/signup', function (req, res) {
res.status('500').send('showAlert');
});
这是我的HTML POST方法调用
$.post("/signup", userData, function(error){
if(error.responseText == 'showAlert')
{
alert("User already exists");
}
});
为什么我没有得到任何警告?