Deno is a secure runtime for JavaScript and TypeScript.

Deno is basically Node reversed.

We will install Deno on Arch Linux, I will list two methods.

First method.

You can install it using Pacman by entering the command below,

sudo pacman -S deno

Here is the web link to the package.

Second method.

Enter the following commands in Terminal.

curl -fsSL https://deno.land/x/install/install.sh | shCode language: JavaScript (javascript)

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"Code language: JavaScript (javascript)

Open a new Terminal instance.

Testing Deno

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.tsCode language: JavaScript (javascript)

You can also write your first Deno hello world server, code example 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" });
}Code language: JavaScript (javascript)

Now you have Deno successfully installed.

Happy Coding ☺

I compiled a list of software and services that I use to improve my workflow, here is the link to the list.

Darryl Dias

I’m Darryl. I’m a 3D Artist, Programmer and Linux enthusiast. On this site I share my insights, tips and tricks, tutorials, methods and best practices.

Leave a comment

Your email address will not be published. Required fields are marked *