Deno on Ubuntu

Deno is a secure runtime for JavaScript and TypeScript.

Deno is basically Node reversed.

https://darryldias.me/2020/deno-v1-1-1-has-been-released/

We will install Deno on Ubuntu.

Enter the following commands in Terminal.

sudo apt install curl # do this if you don't have curl already installed
curl -fsSL https://deno.land/x/install/install.sh | sh

Next step is specifying Deno's path to bash.

Open .bashrc and add the lines below to it.

nano ~/.bashrc
export DENO_INSTALL="/home/$USER/.deno"
export PATH="$DENO_INSTALL/bin:$PATH"

Open a new Terminal instance.

Enter the following command.

deno

To check the version on Deno simply run.

deno -v

Run the following command.

deno run https://deno.land/std/examples/welcome.ts

You can also write your first Deno hello world server, sample code below.

import { serve } from "https://deno.land/std@0.59.0/http/server.ts";
const s = serve({ port: 8000 });
console.log("http://localhost:8000/");
for await (const req of s) {
  req.respond({ body: "Hello World\n" });
}

https://darryldias.me/2020/deno-package-manager/

https://darryldias.me/2020/deno-on-centos-rhel/

https://darryldias.me/2020/deno-on-fedora/

Now you have Deno successfully installed,

You can join the discussion on Reddit

Happy Coding!

I'm Feeling Lucky
Darryl Dias

Written by Darryl Dias

The AI guy and founder of Caprycon, building AI-powered tools, exploring emerging technologies, and sharing insights from the world of artificial intelligence