A Playground Project for Fiddling Around with Deno

A Playground Project for Fiddling Around with Deno

deno-playground A playground project for fiddling around with Deno.

deno-playground

A playground project for fiddling around with Deno.

Prerequirements

  1. Install deno

  2. Install velociraptor

Note: In case you use ZSH and you get a command like:

zsh: command not found: vr

then open your ~/.zshrc and add the following line:

alias vr="~/.deno/bin/vr"
  1. In case you use Visual Studio Code - install
  1. In case you prefer to use a different, somewhat popular IDE with a mediocre plugin infrastructure, there might also be a vaguely functional deno plugin for you

Nice to know

What the creator of Deno says about it: https://www.youtube.com/watch?v=M3BM9TB-8yA

Differences to Node: Security

Feature Node Deno
Default file system read access yes no
Default file system write access yes no
Default network access yes no
Default environment access yes no
Default subprocess access yes no
Default commend for allow / restrict all ? yes

Differences to Node: Architecture

Feature Node Deno
Build with C++ Rust
Supports TypeScript out-of-the-box no yes
Uses local dependencies (package.json) yes no
Supports ES5 modules (require syntax) yes no

How to manage script commands in Deno?

This is what the above mentioned velociraptor script runner does. It also allows you to manage access rights for scripts. Check the scripts.json file for a reference to all available commands, like for example:

vr run cat-fact

How to manage environment variables in Deno?

Same here - you can define environment variables using the scripts.json and access them via the Deno.env API, like:

Deno.env.get("CATS_API_HOST")

How to manage dependencies and versions in Deno?

As a best practice you can just create a dist.ts file and export the scripts you want to use from there, so you have one file where you can manage dependencies.

Where can I find available third-party-modules?

Check out the Deno Land library: https://deno.land/x

Download Details:

Author: voodoods

Source Code: https://github.com/voodoods/deno-playground

deno nodejs javascript

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

Top 5 Reasons Javascript Developers Prefer Deno over Nodejs

The maker of NodeJS, Ryan Dahl, has released a new runtime that aims to solve many of the shortcomings of Node. Your initial reaction might be “Oh great, another Javascript framework? Just what I needed…”. Don’t worry, I had the same reaction. After understanding the advantages, I too saw why Deno is exactly what a back-end Javascript developer needs in 2020. Let’s take a look at the top 5 reasons javascript developers are having a much smoother and more modern experience using Deno vs. Node.

Deno - How to Compile & Run Javascript Code in Deno Runtime

Learn How to Compile & Run Javascript Code in Deno Runtime.

What is Deno? Deno vs. NodeJS

What is Deno? Deno vs Node. Deno is the upgraded version of NodeJS. Explore features of Deno. Will it take over Node.js or not? Deno is based on Google's Chromium V8 JavaScript engine and written in programming language Rust as opposed to C++ for Node

Deno ¿el verdadero Nodejs?

Deno ¿el verdadero Nodejs? - El 13 de mayo de 2020 se liberó la versión 1.0 de Deno, un nuevo entorno de ejecución para correr javascript y typescript, basado en el motor V8 de Google y ...

Decoding Nodejs

The main goal of this blog is to explain the “Architecture of Nodejs” and to know how the Nodejs works behind the scenes. Generally, most of the server-side languages, like PHP, ASP.NET, Ruby, and including Nodejs follows multi-threaded architecture. That means for each client-side request initiates a new thread or even a new process.