Deno, what comes after Node.js

Deno is a relatively new runtime for both JavaScript and Typescript. It was released 2 years ago by Ryan Dahl, creator of Node.js, and, because there’s always room for improvement, he wanted to fix the things he considered wrong with Node.js.
There are several differences between the two, but in this article we will focus on three of them: Integrated typescript support, security and package management.


Installation is very simple and can be performed from the command line.

For macOS and Linux:

curl -fsSL | sh

And for Windows, using Powershell:

iwr -useb | iex

That’s it, now you can run your first program using Deno like this:

deno run

As you can see, you can just provide an url of the file without having the source code on your machine.

You can read more on installation information here.

Integrated Typescript support

Typescript and Deno.js are similar since both aim to improve the shortcomings of their predecessors Javascript and Node.js. Having that in mind it makes more sense that Deno offers integrated Typescript support. All you have to do to run a typescript file is:

deno run main.ts

It’s that simple. No more transpilers.


Deno is more focused on security. By default, a program has no permissions (file, network and others) and you need to grant them when you run the code from the command line.

Some of them are:
–allow-net=<allow-net>. You can allow all network calls or specify allowed domains (i.e. –,

–allow-read and –allow-write are similar and like the previous one, you can allow access to any file or specify allowed folders or files (–allow-read=/etc)

A list with all the permissions can be found here.

Package management

In the beginning of the article you’ve seen that you can execute a file using just an url. That applies also to dependencies since we no longer have node_modules and package.json like we did with Node.js.
Using a third party library is not always as easy as it should be, but with some luck you may find your desired module on and import it like this:

import format from “


Let’s get our hands dirty and run some piece of code using Deno. Here’s a simple utility script that looks for duplicates in a list of folders. You can run it like this:

deno run --allow-read --unstable "" folder1 folder2

You may also delete the duplicates using the –delete / -d flag:

deno run --allow-read --allow-write --unstable 
"" folder1 folder2 -d

Note that the –allow-write permission was granted so the files can be deleted. Otherwise an error is raised.


As of October 2020, more than two years after the first release, Deno reached version 1.4.4 and it begins to be considered production ready. If you’re not comfortable to use it in your project right now, it would be useful to get to know the new kid in town since you might use it in the near future. Until then, you can start using it instead of bash or python for writing utility scripts.

Previous post Next post

Recap of our Festive Celebration at Muura Steak House!

Read More

AI & Machine Learning in Software Testing

Read More

Comments are closed.