我找不到更改布局路径的方法。
_config.viewsFolder = __dirname + '/views/';
var layout = _config.viewsFolder + 'layout';
res.render(_config.viewsFolder + template, {
data: data,
layout: layout
});
路径没问题:
/Users/user/Documents/work/noject/node_modules/noject/admin/views/layout.html
,但是当我尝试将它用于布局时,它看起来是一些基本路径:
Express
500 Error: ENOENT, open '/Users/user/Documents/work/noject/views/Users/user/Documents/work/noject/node_modules/noject/admin/views/layout.html'
如何更改/删除布局的默认起始路径:
'/Users/user/Documents/work/noject/views/'