What app.set function does (express.js)?

前端 未结 3 1514
攒了一身酷
攒了一身酷 2021-02-13 14:09

I am new to node.js and was going through an example could not understand app.set(\'title\', \'My Site\'); does please help?

3条回答
  •  闹比i
    闹比i (楼主)
    2021-02-13 14:26

    Use the following

    app.set('views', path.join(__dirname, 'views'));
    

    This will set your apps view folder to something like:

    /Users/jilles/Project/myApp/views
    

提交回复
热议问题