Deno is a runtime for JavaScript, TypeScript, and WebAssembly that is based on the V8 JavaScript engine and the Rust programming language.
Deno was announced almost 2 years ago by the original creator of Node.js, Ryan Dahl, at JSConf EU.
The official webpage is this.
Let’s start with the installation of the scoop with this PowerShell command:
1 2 3 4 5 6 7 8 | iwr -useb get.scoop.sh | iex Initializing... Downloading... Extracting... Creating shim... Adding ~\scoop\shims to your path. Scoop was installed successfully! Type 'scoop help' for instructions. |
The next step is to use the scoop tool to install deno:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | scoop install deno Installing 'deno' (1.31.2) [64bit] from main bucket deno-x86_64-pc-windows-msvc.zip (29.8 MB) [===================================================================] 100% Checking hash of deno-x86_64-pc-windows-msvc.zip ... ok. Extracting deno-x86_64-pc-windows-msvc.zip ... done. Linking ~\scoop\apps\deno\current => ~\scoop\apps\deno\1.31.2 Creating shim for 'deno'. 'deno' (1.31.2) was installed successfully! ... deno upgrade Looking up latest version Local deno version 1.31.2 is the most recent release ... deno --version deno 1.31.2 (release, x86_64-pc-windows-msvc) 8 11.0.226.19 typescript 4.9.4 |
Let’s create a simple project:
1 2 3 | C:\HTMLProjects>mkdir deno-project C:\HTMLProjects>cd deno-project C:\HTMLProjects\deno-project>notepad index.js |
Let’s add a simple source code:
1 | console.log('Hello Deno'); |
Let’s run this simple javascript file:
1 2 | C:\HTMLProjects\deno-project>deno run index.js Hello Deno |