I am a novice. I have just come into contact with the node.js
and express
frameworks. I have configured routing according to the online tutorial, but there are some problems, as follows:
first of all, the file structure is as follows:
index.js
:
try to solve it by yourself. If the routes/index.js
and routes/about.js
files are written into the index.js
file (without module export), then the about
page can respond normally, but not in different modules.
I have just come into contact with this aspect, and I don"t quite understand what the problem is. I hope I can have some guidance from my predecessors. Thank you.