I have some files under resources/test/feature/a.feature , b.feature like that , i want read those files using javascript , and the jacascript file location is resources/test/js/read.js. I am using below code to read
function processFeatures() {
var features = [];
var featuresResources = $resources("feature/.*?\\.feature");
for(var i in featureResources) {
var feature = JSON.parse($eval(featureResources[i].content))
features.push(feature);
}
return features;
}
This code works when i run the application from intellij, but when i build a jar file and then run the jar file separately that time it fails to read. I printed the featuresResources , that time it giving empty response.
What needs to do in that case.