at the beginning of learning node+express, there is a question that is not very clear. I would like to ask you a question:
after a new express project is created by default, there are two pages: index and user
I need to write a post interface in the user page:
ajax404 Not Found
, but if I put the post API test in user.js into the ingress page index.js, and then call it in user.jade, it will work normally.
I would like to ask:
whether all APIs need to be placed on the ingress page before they can be called; what should I do if I want to put them in different routes?
= Thank you for your great solution =