In the article management system written by express, the menu navigation bar of each page is the same, but each page queries all the menus once from the database.
How to make the whole website query the menu only once from the database and then use the data for each page?
MongoDB for Database
Mongoose for tools
Unclear
node
Is it possible to load the menu data and put the menu data into the global variable when starting?