Currently in Soul, the path for the environment variable is hardcoded in the src/config.js file, limiting the .env file to be read only from the root folder of Soul.
There are scenarios where users may need to use a different .env file, such as when Soul CLI is a child dependency of another parent package. Soul-CLI consumers may wish to provide Soul env variables in the parent package.
To address this, it would be beneficial to introduce a new configuration option in the CLI schema, such as --env, allowing users to pass the absolute path of their desired .env file to Soul.
By enabling users to specify the .env file path via the CLI command, Soul can offer more flexibility and compatibility with different project setups.
Proposed Solution
Modify the CLI schema in src/cli.js to include a new configuration option named --env.
Users can pass the absolute path of their desired .env file when running the Soul CLI, like this: soul -d foobar.db -p 8000 --env=/Users/Documents/RA-App/.
This enhancement will provide users with the ability to customize the .env file path, enabling Soul to read environment variables from different locations based on the user's requirements.
Feature Request
src/config.js
file, limiting the.env
file to be read only from the root folder of Soul..env
file, such as when Soul CLI is a child dependency of another parent package. Soul-CLI consumers may wish to provide Soul env variables in the parent package.--env
, allowing users to pass the absolute path of their desired.env
file to Soul..env
file path via the CLI command, Soul can offer more flexibility and compatibility with different project setups.Proposed Solution
CLI
schema insrc/cli.js
to include a new configuration option named--env
..env
file when running the Soul CLI, like this:soul -d foobar.db -p 8000 --env=/Users/Documents/RA-App/
..env
file path, enabling Soul to read environment variables from different locations based on the user's requirements.