doedel
1
Hi,
I tried to use:
http://docs.meteor.com/#/full/assets_getText
from a local package. Me hope was, that I can read
some configs from the APP private folder. but I got only an
Error: Unknown asset:
Can Assets.getText in local package only access a private folder inside of the package ?
1 Like
No man! You should add that files as assets: api.addFiles('/myasset.png', 'server', {isAsset: true})
. But this asset will be visible by package only
lol yes WE CAN ![:stuck_out_tongue: :stuck_out_tongue:](https://emoji.discourse-cdn.com/twitter/stuck_out_tongue.png?v=5)
like this
fs.readFile(process.env.PWD + '/private/blabla/data.json', 'utf8', function (err, data) {
if (err) {
console.log('Error: ' + err);
return;
}else{
console.log('Parsing Data Started');
leData = JSON.parse(data);
console.log(leData);
}
});
and enjoy
run this within a meteor function so you won’t deal with the fiber future issues ![:wink: :wink:](https://emoji.discourse-cdn.com/twitter/wink.png?v=5)
2 Likes