JMF Labs logo

deno logo Can Deno change javascript runtimes for the better or it something that the nodejs community just doesn’t need at this time?

Nodejs is about a decade old and some of the first design choices are now showing their age. Like the module system, typing, and guard rails.

A big feature is a native typescript compiling. Most backend code that is written by our team is in typescript. Anyone that has setup typescript, knows it is a process or has some boilerplate for setting up. But to have native compiling for typescript get developers writing code faster.

Another awesome feature is the guard rails. No more wild west, Deno requires you to explicitly allow each run to read/write files or make internet calls. This is great for javascript build systems and cloud systems. Where you want to limit the abilities of bad actors coming in as a good actor.

Our current assumption is it is great to test with, maybe build a build system with it. The future looks bright for it and for sure to keep it on the watch list.

Here is some an example code to get started...

First we need to install deno

Using the shell installer

curl -fsSL | sh


using brew

brew install deno

Now you should be able to do

deno --version

to make sure you have it working.

As pointed out we can now import external code snippets safely like we would in javacript in the browser.

deno run

which is really just


console.log("Hello Deno 🦕");

now lets implement an easy to use file reader program in deno.


for (let i = 0; i < Deno.args.length; i++) {
  let filename = Deno.args[i];
  let file = await;
  await Deno.copy(file, Deno.stdout);

As you can see we don't need another library to read in the arguments or to open the file. Once we save it we can run it like so...

deno run --allow-read output.ts test.txt

Remember we need to explicitly give permission to deno to allow it to read the filesystem. And you have now written your first deno program.explicitly

If you need typescript or deno help please contact us