javascript - Sail.js: File Access -


i'm trying use d3 visualize datasets in web app built off of sails.js framework, i'm having trouble specifying d3 dataset .tsv files are.

basically, stored "data.tsv" in same folder view that's visualizing data. load data, d3 uses function in fashion:

    d3.tsv("data.tsv", type, function(error, data) {     ...     }); 

however, when function tries retrieve data, goes "http://www.mywebserver.com/analytics/data.tsv" , gets 404 not found error though stored data.tsv in analytics view folder. know because of way sails handles routing - there way bypass this? best way access raw files stored in sails.js project?

the view folder not available publicly. files in .tmp/public available when server running. don't copy files folder manually. gets emptied every time server restarts.

files in assets/ copied grunt build tool when server starts. want put files there. suggest reading sails asset management.

sails assets


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

inno setup - TLabel or TNewStaticText - change .Font.Style on Focus like Cursor changes with .Cursor -