Skip to content

initialize from JSON string #32

Open
@informvisu

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions