Perhaps i want to store my views in /pages directory. Next code in configs of sails directory does not reinit views path:
paths: {
views: path.normalize(__dirname + '/../pages')
}
but code for public dir works well:
paths: {
public: path.normalize(__dirname + '/../any_public_dir')
}
What can i do?
Because of the way that Sails loads configuration, it's not currently possible to change the path for most things from within a file in the config folder. You can, however, do it in the .sailsrc file:
{
"paths": {
"views": "../pages"
}
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With