How do I end the entire routing function in the mongodb callback?

as shown in the figure, how to stop executing all the following code after each return.
clipboard.png

Mar.01,2021

there is no good way to use callbacks. Because they are all asynchronous, your database operations are basically carried out immediately. It is recommended that you use promise combined with async/await to do it.

Menu