Skip to content

Define file name with .env #16

@htnabe

Description

@htnabe

For now, I am considering using the following specifications for file loading.

  1. only one file can be loaded
  2. specify only the folder name from the .env file
  3. automatically read json files that exist in the specified folder name

Problem

With this method, if there are multiple json files in the specified folder, the intended file cannot be read. For example,

  • env file
    DATA_DIR=. /hoge

  • Directory structure
    /root
    ┣ /hoge
    ┃ ┣ a.json
    ┃ ┗ b.json
    ┗ .env

In such a case, it is not possible to explicitly set whether a.json or b.json is to be read.

Solution

Make it possible to set the relativve path to the target json file like the following way.
FILE_PATH=./hoge/a.json

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions