Deno Hello world


Deno is next thing you should learn if you are Nodejs user. Lets’ start with a hellow world. Before that you need to

  • Setup Deno
  • Setup your code editor VS Code / Atom
Here us a quick read links for beginners

TypeScript

You need not install anything special for TypeScript. Deno support JavaScript and Type script as well. Most of the users prefer Microsoft TypeScript, which is a superset of JavaScript and has full of features.

It is similar to JS, so need not worry about that. Lets create a folder for our project and create the main.ts file. and lets print a hello world message.

console.log('Hello world')

Running the script

In order compile and run the file you have to run the deno run command .

deno run main.ts

Deno can compile and pack the app as a single file unlike Nodejs , and has zero dependencies. The single file can be attached to html directly.

We will see more examples in upcoming posts. All of my Deno projects will be published on my GitHub Repo, so keep watching.

Published by

Manoj

A developer,teacher and a blogger obsessed with Python,Dart and open source world from India

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.