Skip to content
This repository was archived by the owner on May 17, 2019. It is now read-only.
This repository was archived by the owner on May 17, 2019. It is now read-only.

Config files in addition to env variables #289

Open
@akre54

Description

@akre54

I'd like to propose the ability to load Fusion config variables from a file instead of requiring that they live in an env variable, similar to dotenv.

Certain properties like ROUTE_PREFIX and ROOT_DIR are really app-specific and app-wide globals, and the current method of passing them as env variables before calling the fusion-cli (or even worse, setting them in your local dev environment) seem to be at odds with their intended usage.

Ideally, the resolving order would go, in order of precedence:

  1. Environment variables from process.env
  2. A file loaded from config/development.js / config.production.js (i.e. use NODE_ENV / FUSION_ENV)
  3. A file loaded from config/common.js

I like that Fusion puts most other local config in src/config, but it would be great to have a place for app-wide fusion variables to live that doesn't require hacking a package.json.

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