ConnecMent / bank

The repo to include all learning-focused issues of ConnecMent
0 stars 0 forks source link

Bun: Env vars #10

Open mkermani144 opened 3 weeks ago

mkermani144 commented 3 weeks ago

Description

Write a simple JS program that can be run with Bun. 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 bun index.js

it will print

Ali Arash Leili

Suggested resources

https://bun.sh/docs/runtime/env