Deno is a Javascript runtime. Some devs will say that it is an alternative for NodeJS but it is not an alternative it is unique.
Ryan Dahl the creator of Nodejs created this Deno.
NODE -> NO DE -> DE NO -> DENO
Why Deno
- It is secure (It wont give direct access for files, environment and Network etc. User needs to give permissions to use)
- Supports Typescript
- Gives single executable file
- It had built-in utils like code formatter and inspector
- Uses V8 runtime
- Built in rust
- No need npm
- package.json not required
- dependency manager not at all required
- Gives Zero dependency build
Installation
Linux/Unix/OS X :
curl -fsSL https://deno.land/x/install/install.sh | sh
Windows Powershell :
iwr https://deno.land/x/install/install.ps1 -useb | iex
Other ways :
#Using Brew(MAC OS)
brew install deno
#Using Chocolatey (Windows)
choco install deno
Running First Deno program
deno run https://deno.land/std/examples/welcome.ts
Hello World with colored text on console
create a file name it helloworld.js
import clc from 'https://deno.land/x/color/index.ts'
console.log(clc.red.text("Hello World"))
console.log(clc.blue.text("Hello World"))
Run the following commands to run your first Deno program
deno run helloworld.js
Top comments (0)