Hello guys today in this tutorial I will basically show you how to configure Dino which is basically a runtime environment
It's an alternative to Node.js. It's a next-generation JavaScript runtime environment and we will be looking at how to set up this inside Visual Studio code and we will be running a first program
Hello World program. I will be showing you step by step. So this is basically the
official website of dino.com and you can make in next generation JavaScript runtime
It's an alternative to Node.js. Many developers, almost 2 million developers are using it
So first of all, now to install this guys, we can locally install this
You can see if I open Dino here, if I write this, nothing is returning right here
Deno is not recognized as an internal or external command. So we need to install Deno
So first of all, to install Deno guys, you need to go to your PowerShell
So PowerShell is not a command line. command line this is the actual program Windows PowerShell
in the run menu you just need to search for this program
which is Windows PowerShell so just search for this program Windows PowerShell
so this is the thing we need this one so here we will open this and
inside Windows this has this program Windows PowerShell and now this you need to execute the command guys the command I have given in the description
of the video you can copy paste that command the command is I-W-R and then ST-T-T-PS
this is the address from which we will be downloading Dino Dino L-A- and Dino dot land
slash X slash install slash install dot p s one and then
dash u s e v and then this is a slash that you need to write here after that i e x so this is the actual
command guys you can copy paste this command the command is given in the description of the video
let me zoom in so that you can write it iwr htp s dnod land x install so just install
write this and press enter so as you press enter guys it will go to denote
It will install this you will see now the installation has started it has basically remotely downloading the Dino version
Data's version and the message is printed out that Dino is successfully installed inside your computer and it has also given the address where it has installed it
So in my directory so wherever see users you need to go to your users directory
so inside your C drive so whatever go to your C drive so whatever go to your user directory whatever is the user in my case the user is ASS So in the home directory it has created a folder called as Deno
So this Deno folder has been created guys and now inside this Dino folder you will see basically a bin folder
and inside this bin folder you will see your executable. So this is an EXE file guys. This is the actual Dino file which we have installed right here
So now after that after that after we got this eXE file we can globally use the deno command line functionality now you can close this
power shell and now open a command line inside your you need to basically turn off just close out
all the windows and just restart once again go to your working directory and wherever you need to
create the project so here i will create a new directory deno project i will cd into this
and now basically to configure Dino guys you need to install a
extension in Visual Studio Code Text Reader just go to extension start and you need to
search for this extension which is Dino Dino provides a official extension for
Visual Studio developers so you need to install this so I have already
installed it so simply click install and Once you click install, you will be able to do this
I've already installed it. You need to have this extension. So after you do this, you need to now create a file, Dino file
So Dino works with TypeScript guys. Basically, we can create a HelloWorld program
So helloworld.ts. So Deno works with TypeScript. So the extension of TypeScript is TS
So this is a, we can simply write a console log. message that this is a hello world program so hello world so now to run this program
guys we can simply go to this command and now to check if dno is installed we can
simply say dino and press enter you will basically see the current version of dno
which is installed dno 1.39.4 and this is actually dino you can execute dino right here in
the command line if you want to exit control c press two times it will exit
If you print the version of Dino which is installed, Deno dash-dash version, and basically you will see this is the current version which is installed. Deno 1.3.9.4, release x86. This is TypeScript version, version 8, like this. And now we basically need to run this file here, which is HelloWorld TS. How to run this? Dino run after that the file name, Helloworld.TS. This is actually
command guys dno run after the the command the file name so if you execute this you will basically see hello world will be returned to you which is written right here If I change something here again run this You will see again it will print out the console log message
So in this way, guys, you can run configured you know inside Visual Studio code text editor
We can simply run programs right here. Now let me show you a second program which will be able to run
We will have a file here. TXT file it will read the content of this TXT file and print it out so file dot TXT we will say this is the actual content of the file
you will write something here and we need to read the content of this file through the help of Dino program you will make a new program which is read file t s so in this program guys we will make use of the file system in Dino
file path you will provide the file path here it is present in the root directory so file.ttxd and now inside try catch block we will basically give the file name so here file content
so try catch block if any sort of error take place we can console log that error and now inside deno guys we can simply use the await keyword if you await
dino dot this dino basically dino will be installed here and it contains some
methods out there which is read text file as you will see guys basically
it is saying that it is not detecting it inside so what you need to do is that
you need to go to extensions here just reload this plugin and install it and
uninstall once again so reload this again go to the extensions tab sometimes
it will take some time to detect it so again type deno here so install it once
again so after that you need to drag down so just make sure that you drag down right here
So here, let me just, yeah, so right here, if you see
plugin here of Dino What you need to do is that you need to now press Control Shift P inside Visual Studio Codex and search for the plugin which is you have installed which is Dino you now to just want to enable that enable Deno so now it will enable the extension so now you will not find any sort of error take place so you
will basically see so now we can say Dino and it basically contains these
methods read text file these are two methods out there which is
which is contained. So auto completion you will see basically it is working right here
It contains all these methods, read directory, read file, all that stuff
So we will use this method, read text file. We will actually pass the path here, which is the actual path of the file, file path
So after that what we need to do is that we now need to console log the content
We can simply say here console log, file content. we can say this is comma file content that's also it will print out all the content which is
present inside the file here which is this line if i try to now run this application
just go to your command line and just type here dino run followed by the file name which is
readfile.ts so this time guys we are actually reading the file from we are we are we need to
grant some permissions if you just directly run this file it will ask for the
permission that Dino requires the permission to run this permission which is
dash dash allow read permission to bypass and here you need to grant this
permission simply press why it will grant the permission and now this will print
out the actual content of the file. Kane Williamson is the captain of New Zealand
you will see that it has granted the read access to read the content of the
file and it has printed out the content and you can even
directly pass the flag in the command, Dino run, dash, allow, dash, read
and then followed by the name of the file, which is readfile.t.s
If you directly type this, you will basically see we need to pass this flag
So inside Deno, we have different kinds of flags for the right operation, read operation
all these. You need to pass this and it will now basically print out the content of the actual file
So in this way, guys, we have In this way, guys, we can configure Dino inside Visual Studio code text editor and basically run programs
And if you want to uninstall Deno at any point of time, you can directly do that by going to the C directories
and go to your user's directory, go to the home directory and simply delete this folder
Just delete that Deno folder and it will uninstall Deno. So thank you very much guys for watching this tutorial
this tutorial all the commands are given in the description of the video and i will be seeing you in the
next video please hit that like put and subscribe the channel as well