Deno is an open-source and free javascript and typescript runtime environment and it is similar to Node.js. Deno is based on a v8 javascript engine, Tokio, and Rust language. It was created by Riyan Dahl the creator of Node.js. Deno focuses to give a secure and productive environment for the present programmer. It is a secure runtime environment. Deno was officially released on May 13 2020.
Deno doesn’t need any package managers and dependencies and registry. It has a built-in tool and it is secured by default and has no access to file, network, and environment access. Deno dispatches as a single executable without any dependencies.
Deno and Node.js Comparision:
- It use ES module as the default, instead of using CommonJs
- It uses URLs for loading remote or local dependencies, related to browers
- Deno includes built-in package manager, so we don’t need NPM
- It redesigns API to make use of promises, TypeScript and ES6 features.
- Deno focuses to give greater compatibility with browsers with broad range of API
In this article we are going to learn how to install Deno on Windows, Linux, Mac.
Deno Installation:
For installing Deno, as per machine type run the following commands:
Mac and Linux:
Run the following commands on your Mac and Linux Shell to install deno.
curl -fsSL https://deno.land/x/install/install.sh | sh
Windows:
Run the below commands on Windows PowerShell to install deno.
iwr https://deno.land/x/install/install.ps1 -useb | iex
Install Deno via Package Manager:
Homebrew for Mac:
brew install deno
Chocolately for Windows:
choco install deno
Scoop for Windows:
scoop install deno
For more see the Deno official website.
Conclusion:
Congratulations! We successfully installed Deno. In this article we have learned how to install Deno on Windows, Mac, Linux machines.