Reputation: 1863
Is it possible to remove the view engine components from sails js but keep the assets folder ? I would like to serve only static content and have all the communication go through a rest api.
Upvotes: 3
Views: 911
Reputation: 98
You can put static files on asstes folder
Example:
You have a html file named : test.html
Put this file on /asstes/ folder
Now you can access this file by : 127.0.0.1:1337/test.html
If you put your file to /asstes/somefolder/index.html
You can access by 127.0.0.1:1337/somefolder
Upvotes: 2
Reputation: 697
create your project with the argument --no-linker
like this:
sails new --appName myapp --no-linker .
Upvotes: 2
Reputation: 1621
If you want to completely disable views in your sails open .sailsrc
and and file should look like this:
{
"hooks": {
"views": false
}
}
Upvotes: 2