Structure of Express/Mongoose app

后端 未结 5 1493
醉酒成梦
醉酒成梦 2021-02-10 09:00

How should I go about structuring my express/mongoose application, so that I can use my schemas, models, routes and the functions that get called when those routes are hit?

5条回答
  •  离开以前
    2021-02-10 10:03

    I recently ran through a tutorial which generated this sample app which has one of the best structures that I've seen. Look under /server/models/ to see how Mongoose is setup.

提交回复
热议问题