Ask EchoJS: Is it possible to change Express view folder based on where is the file that res.render() is called?
▼4 up and 0 down, posted by
4 up and 0 down, posted by
For example, if I call res.render(viewName) inside /folder/file.js, I would like that Express look for the view inside /folder/views. If the file is inside /folder1/folder2/file.js, I would like that Express look for the view inside /folder1/folder2/views Is it possible? Tried to ask on StackOverflow, but nobody knew, so... I think it would be useful if somebody know how to do it!