我测试了您的代码,它在chrome中对我有效,但有一个更改:更改
app.post为
app.get
编辑:由于您似乎认为仅POST服务器是一个好主意,请阅读:http :
//net.tutsplus.com/tutorials/other/a-beginners-introduction-to-http-and-
rest/ 向下滚动直到使用HTTP动词,然后查看GET和POST之间的区别。:)
一些快速研究表明,其他浏览器可能存在其他问题,例如IE可能期望URL结尾

我测试了您的代码,它在chrome中对我有效,但有一个更改:更改
app.post为
app.get
编辑:由于您似乎认为仅POST服务器是一个好主意,请阅读:http :
//net.tutsplus.com/tutorials/other/a-beginners-introduction-to-http-and-
rest/ 向下滚动直到使用HTTP动词,然后查看GET和POST之间的区别。:)
一些快速研究表明,其他浏览器可能存在其他问题,例如IE可能期望URL结尾