Skip to content

A question about managing test and development on the same machine #150

Description

@juanpaco

I apologize in advance for posting what isn't actually an issue with the library. I wasn't sure what other channel to ask this question through.

v1 removed auto .env.${ NODE_ENV } overrides, and so forth, and this was a fine change IMO. I buy into the separate deployments. My question is more about your workflow as the library owners.

When I'm developing an app on my machine, I'm generally doing stuff in development and test, and these each have their own database they work with. I've had it in my head that I need separate databases for those "environments," so that my unit tests don't clobber when I'm just poking around in a browser.

I do a branch on process.env.NODE_ENV to find the correct file for dotenv to load. It works well enough, but still feels like a hack to support 2 separate "deployments" on a single machine.

So, I'm just wondering how you folks deal with doing development and testing on the same machine. Do you do a similar branch on an env var? Do you just do development and testing in the same DB? Feed the db connection stuff in through the command line? Something else?

I read through all the closed issues, and when this subject was touched on, branching based on an env var was mentioned. Just wondering if there's something more refined.

Metadata

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