I have a problem when I cannot serve files jsonfrom my subfolders. Below is the code:
var browserSync = require('browser-sync').create();
gulp.task('connect', function() {
browserSync.init({
server: {
baseDir: "app/"
}
});
});
All my files staticand angularjsfound within the application folder. When I go to http://localhost:3000, the page loads, but the corresponding json file inside app/data/myfile.jsondoes not load.
I get the following error in my console:
POST http: // localhost: 3000 / data / json / myfile.json 404 (not found)
The strange thing is, when I try to load the path in my browser, the json file is loaded.
source
share