What is the difference between setting a property on app.locals and calling app.set()?

前端 未结 4 615
迷失自我
迷失自我 2021-02-05 07:09

I\'m in the process of learning Express - and thinking of the best place to save config style data. Options available are either in app.locals or app.set (settings)... so:

4条回答
  •  一生所求
    2021-02-05 07:36

    Lots of people indeed use locals instead of app.set so my advice is to use that.

提交回复
热议问题