Deno First Program

Now, since we have successfully installed deno as per the steps covered in the previous section, let us run our deno first program.

The file welcome.ts is a typescript file with a simple console message “Welcome to Deno 🦕” and is hosted on the website.

We will directly run that file from our PowerShell command prompt.

$ deno run

Deno First Program

A. File

Installing deno and Running our first program. Here, we are just running the welcome.ts file that exists on the website.

Getting Started with Deno

B. Local File

Let’s try to run a local Typescript file using deno.

File: helloworld.ts

console.log("Hello World 🦕");

To run this we need to use one of the Deno commands:

deno run helloworld.ts

Deno First Program – Output

Hello World 🦕

In this section, we have run our first Deno program using files hosted on as well as on a local machine.

In the next section, we will be looking at the lifecycle of a Deno program.