Did you know about `Deno.env`?

preview_player
Показать описание
Deno has built in ways to access environmental variables.

Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.

Рекомендации по теме
Комментарии
Автор

that's amazing, although I find it counter-intuitive that you have also to import the loader...I think Deno.env.get behaviour should include that by default (if the correct --allow-env permissions are given)

marcomow
Автор

Why would you go around Deno permissions system, it's one of its best features, isn't it?

BogdanTestsSoftware
Автор

Honestly .env is a bad way to store server parameters. It should be a json file like the case with .NET, to avoid having to parse values. Plus, .env have a lot of weird behaviour (like not allowing semicolons, slashes and more).

parlor