You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation, using the fs module, allows the properties file to be read only from the local file system. A use case I came across needed to access the properties file across a network, via http/https. Could this be added easily enough, or is it too much work or not appropriate?
The text was updated successfully, but these errors were encountered:
Hi, while it's not explicitly permitted in the API - you can replace the content of the properties using the read( properties: string ): void method, for example:
const reader = require('properties-reader');
const request = require('request');
const properties = reader(`${__dirname}/some.properties`);
request('http://server.com/properties.ini', (err, res) => {
if (res) {
properties.read( res ); // assumes res is an ini file format, appends it into the reader
}
});
The current implementation, using the
fs
module, allows the properties file to be read only from the local file system. A use case I came across needed to access the properties file across a network, via http/https. Could this be added easily enough, or is it too much work or not appropriate?The text was updated successfully, but these errors were encountered: