Skip to content
This repository was archived by the owner on Feb 15, 2023. It is now read-only.
This repository was archived by the owner on Feb 15, 2023. It is now read-only.

Custom config file directory is not working #47

@fedealconada

Description

@fedealconada

The code below is the one that allows someone to specifiy a different directory for the getstream.js config file"

if (typeof process != 'undefined' && process.env.STREAM_NODE_CONFIG_DIR) {
		config_file = process.env.STREAM_NODE_CONFIG_DIR + '/getstream.js';
	} else {
		config_file = process.cwd() + '/getstream.js';
	}

The main problem is that, in case we specify a value for STREAM_NODE_CONFIG_DIR this will always be some path relative to the project. Therefore, we must append the process.cwd() to the url.

Moreover, I'm working now with Node v14 and, because of compatibility things, I need to specifiy getstream.js with the .cjs extension. But this is not possible with the current setup because stream-node-orm is forcing us to use a file named getstream.js.

My proposal is just to use a STREAM_NODE_CONFIG_PATH variable that would be path to a file and not a directory path.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions