Open
Description
May be an enhancement. Initialize from JSON string to facilitate the properties sharing in Node.js worker threads.
const propsReader = require('properties-reader');
//Now
global.env = propsReader(path/to/file/name);
//Future
global.env = propsReader(path/to/file/name, JSON string, writeToFile); //Write to file, if true
For architectural reasons, don't allow threads to read the properties from file. You might know that worker_threads doesn't allow object sharing
Metadata
Assignees
Labels
No labels