Deno is a server runtime for javascript and typescript, it serves the same function as NodeJS, but different implementation. Deno strives to closely model the implementation of the browser version of javascript for better compatibility.


One of the handiest modules in the NodeJS ecosystem is the dotenv module. With this module you can create a .env file and place your environment variables for your application, then you can load them into your application using a require('dotenv').config() function. In Deno, we do not have require, and Deno handles the loading of environment variables differently.


With Deno, you call, instead of the NodeJS way of process.env being a simple object. The Deno.env is not a plain object. You can access the values using the get method.

dotenv for Deno

There is a dotenv for Deno, that is even easier to use than dotenv of NodeJS.

create your .env


import the load.ts module from the dotenv package

import "";


And now you can access your config information from a .env just like you would access environment variables in Deno.


Deno has some different updated technology that still takes getting used to, but many libraries that we use in NodeJS have alternate libraries in Deno now and can serve the same purposes. Check out the Deno Third Party ecosystem for these implementations.

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

About hyper

hyper is a service framework built using Deno, check hyper out at, learn how you can build scalable applications using hyper.