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
- How to install Deno on Windows - Deno tutorial for beginners
- How to install Deno on Ubuntu Linux - Deno tutorial for beginners: how to install Deno on Windows
- Deno : next generation Node - About Deno TypeScript Runtime
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.