Skip to content

Node: Env vars and dotenv package #34

@mkermani144

Description

@mkermani144

Description

Write a simple JS program that can be run with Node. It should read three different env vars MANUAL, DOTENV, LOCAL, which are read from manual env vars, .env and .env.local files respectively, and prints them on console in order. So for example, having the following env files:

# .env
DOTENV=Arash
# .env.local
LOCAL=Leili

When we run

MANUAL=Ali node index.js

it will print

Ali Arash Leili

Suggested resources

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