My experience with Deno.js: Is it node Killer?

YASH RAJ
2 min readJun 29, 2020

--

Deno is a general-purpose JavaScript/TypeScript programming environment. It brings together many of the best open-source technologies and offers a comprehensive solution in one small executable file.

Created by Ryan Dahl, best known as the mastermind behind Node.js, Deno takes advantage of the JavaScript features that have been available since Node.js was released back in 2009. It also addresses the design flaws that Ryan talked about in his “10 Things I Regret About Node.js” lecture. Some are calling it the sequel to Node.js, although the author himself makes no such claim.

Deno is built with :

  • Rust (Deno’s core was written in Rust, Node’s in C++)
  • Tokio (the event loop written in Rust)
  • TypeScript (Deno supports both JavaScript and TypeScript out of the box)
  • V8 (Google’s JavaScript runtime used in Chrome and Node, among others)

It is an attempt to fix the issues with Node.js

I have made a Chat application on Deno.js but couldn’t host it because it Heroku and other popular hosting services don’t officially support Deno.js as of now.

How Deno is coping with the Node’s Shortcomings:

For security reasons, Deno does not allow programs to access the network without explicit permission eliminating the security threat.. To allow accessing the network, use a command-line flag:

$ deno --allow-net https://deno.land/std/examples/echo_server.ts

No to node modules and Package.json:

Nopackage.json, no node_modules.Deno can import libraries directly from URLs. Deno explicitly takes on the role of both runtime and package manager. It uses a standard browser-compatible protocol for loading modules: URLs This example uses a URL to import an assertion library:

import { assertEquals } from "https://deno.land/std/testing/asserts.ts";Deno.test(function t1() {
assertEquals("hello", "hello");
});Deno.test(function t2() {
assertEquals("world", "world");
});await Deno.runTests();

Deno supports TypeScript out of the box.

Among other things, Deno is a great replacement for utility scripts that may have been historically written with bash or python.

So is Deno.js node killer? No, not in the near future because deno has long way to go and node is already been used by various companies with heavy backing from developers around the Globe. Deno is under development and is not supported by many services as well.

--

--

YASH RAJ
0 Followers

I write about tech, business strategies, insights on my personal blog. https://intotheinsights.com/articles