<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jaquiel Paim</title>
    <description>The latest articles on DEV Community by Jaquiel Paim (@jaquiel).</description>
    <link>https://dev.to/jaquiel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F281876%2F4715dda3-6ff8-47ff-9896-8ab0d64e0aa0.png</url>
      <title>DEV Community: Jaquiel Paim</title>
      <link>https://dev.to/jaquiel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jaquiel"/>
    <language>en</language>
    <item>
      <title>Docker built-in container support for .NET 7</title>
      <dc:creator>Jaquiel Paim</dc:creator>
      <pubDate>Sun, 09 Oct 2022 22:15:40 +0000</pubDate>
      <link>https://dev.to/jaquiel/docker-built-in-container-support-for-net-7-3ej0</link>
      <guid>https://dev.to/jaquiel/docker-built-in-container-support-for-net-7-3ej0</guid>
      <description>&lt;p&gt;On 14th September 2022, Microsoft announced .NET 7 Release Candidate 1, the first of two release candidates (RC) for .NET 7 that are supported in production.&lt;/p&gt;

&lt;p&gt;The .NET 7 launch is scheduled for November 8-10, 2022 on the &lt;a href="https://www.dotnetconf.net/"&gt;.NET Conf 2022&lt;/a&gt;! Until then we can try some of the new features and improvements of this new &lt;a href="https://devblogs.microsoft.com/dotnet/announcing-dotnet-7-rc-1/#:~:text=Don't%20forget%20about%20.,NET%207%20release"&gt;.NET release&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;Among several new and interesting features, one that I particularly liked and would like to highlight here is just the docker built-in container support for .NET 7.&lt;/p&gt;

&lt;p&gt;This new .NET 7 resource, which is part of one of the new cloud native features, helps .NET to further consolidate itself as an excellent alternative for building cloud-native applications and achieving resiliency, scalability, efficiency and speed in your web apps.&lt;/p&gt;

&lt;h1&gt;
  
  
  Let's get started
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;For this release, you must have Docker and .NET 7.0.100-rc.1.22431.12 or higher installed. Additionally, only Linux-x64 containers are supported&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Below we can see how simple it is to build a containerized ASP.NET application from scratch.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# 1st step - create a new project 
dotnet new mvc -n my-containerized-app

# 2nd step - move project to its directory
cd my-containerized-app

# 3rd step - add a reference to a (temporary) package that creates the container
dotnet add package Microsoft.NET.Build.Containers

# 4th step - publish your project for linux-x64
dotnet publish --os linux --arch x64 -p:PublishProfile=DefaultContainer

# 5th step - run your app using the new container
docker run -it --rm -p 5010:80 --name my-cloud-native-app my-containerized-app:1.0.0

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you are familiar with docker and the .NET CLI, or have already mastered them, you will probably have no difficulty understanding the above sequence of instructions. &lt;/p&gt;

&lt;p&gt;However, if you're a &lt;em&gt;beginner&lt;/em&gt;, let's take a look at each statement, step by step.&lt;/p&gt;

&lt;p&gt;In the &lt;strong&gt;&lt;em&gt;first&lt;/em&gt;&lt;/strong&gt; and &lt;strong&gt;&lt;em&gt;second&lt;/em&gt;&lt;/strong&gt; steps, we just created a new .NET application with the &lt;em&gt;ASP.NET Core Empty&lt;/em&gt; template and then moved to the new project directory.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dotnet new mvc -n my-containerized-app
$ cd my-containerized-app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dotnet new&lt;/code&gt; : command to create a new project&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;mvc&lt;/code&gt; : argument to set the .NET template project&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-n&lt;/code&gt; : option for the created output&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In the &lt;strong&gt;&lt;em&gt;third&lt;/em&gt;&lt;/strong&gt; step, we added &lt;code&gt;Microsoft.NET.Build.Containers&lt;/code&gt;, a &lt;a href="https://www.nuget.org/packages/Microsoft.NET.Build.Containers"&gt;nuget package&lt;/a&gt; for publishing .NET applications natively as containers.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dotnet add package Microsoft.NET.Build.Containers
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In our example we are using the &lt;a href="https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/start-mvc?view=aspnetcore-6.0&amp;amp;tabs=visual-studio-code"&gt;empty mvc template&lt;/a&gt;, but in your own project what you need to do is just add this package to it.&lt;/p&gt;

&lt;p&gt;Taking a look at a &lt;em&gt;&lt;code&gt;my-containerized-app.csproj&lt;/code&gt;&lt;/em&gt; file you can see the package there:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  &amp;lt;ItemGroup&amp;gt;
    &amp;lt;PackageReference Include="Microsoft.NET.Build.Containers" Version="0.1.8" /&amp;gt;
  &amp;lt;/ItemGroup&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the &lt;strong&gt;&lt;em&gt;fourth&lt;/em&gt;&lt;/strong&gt; step we compiled the application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ dotnet publish --os linux --arch x64 - p:PublishProfile=DefaultContainer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;dotnet publish&lt;/code&gt;: command to compile the app&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--os linux&lt;/code&gt; and &lt;code&gt;--arch&lt;/code&gt;: options to specify the target operating system (OS) and specify the target architecture. We specified linux and x64, respectively. And it’s important to remember that only &lt;strong&gt;&lt;em&gt;Linux-x64&lt;/em&gt;&lt;/strong&gt; containers are supported&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-p&lt;/code&gt;: used for setting properties&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you type &lt;code&gt;docker images&lt;/code&gt; in your console you could see that the image is already created:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;REPOSITORY             TAG       IMAGE ID       CREATED         SIZE
my-containerized-app   1.0.0     b65f7ee7668a   7 seconds ago   220MB
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, in the &lt;strong&gt;&lt;em&gt;fifth&lt;/em&gt;&lt;/strong&gt; and last step we finally run our container.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ docker run -it -p 5010:80 --name my-cloud-native-app  my-containerized-app:1.0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;docker run&lt;/code&gt; : container process that runs is isolated in that it has its own file system, its own networking, and its own isolated process tree separate from the host&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-it&lt;/code&gt; : to run the container in interactive mode instead of detached mode, allowing us to execute commands while the container is in a running state&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;-p 5010:80&lt;/code&gt; : definition of used ports. &lt;code&gt;&amp;lt;port that we will use on our local host&amp;gt;:&amp;lt;port used inside the container&amp;gt;&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;--name my-cloud-native-app&lt;/code&gt; : to set a name for the container, preventing docker from generating a random name for it
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;my-containerized-app:1.0.0&lt;/code&gt; : setting the image that we want to use, in this example, &lt;code&gt;&amp;lt;name of our project&amp;gt;:&amp;lt;version defined by .NET&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If all goes well we will have a result similar to this below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;warn: Microsoft.AspNetCore.DataProtection.Repositories.FileSystemXmlRepository[60]
      Storing keys in a directory '/root/.aspnet/DataProtection-Keys' that may not be persisted outside of the container. Protected data will be unavailable when container is destroyed.
warn: Microsoft.AspNetCore.DataProtection.KeyManagement.XmlKeyManager[35]
      No XML encryptor configured. Key {2b3bd45e-0cc8-4cad-a0b9-ce5593370e33} may be persisted to storage in unencrypted form.
info: Microsoft.Hosting.Lifetime[14]
      Now listening on: http://[::]:80
info: Microsoft.Hosting.Lifetime[0]
      Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
      Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
      Content root path: /app
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then, just access the application in any browser:&lt;code&gt;http://localhost:5010/&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VvavZII5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5r1x5nyfcfr32jq7zim.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VvavZII5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k5r1x5nyfcfr32jq7zim.png" alt="Application running" width="880" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;So, that 's it. We could see how simple this resource is and how &lt;em&gt;useful&lt;/em&gt; it is for our projects. Unlike virtual machines, containers can rapidly scale in and out and are essential to cloud-native applications, offering granular &lt;em&gt;scalability&lt;/em&gt;, &lt;em&gt;portability&lt;/em&gt; and &lt;em&gt;efficient&lt;/em&gt; use of &lt;em&gt;resources&lt;/em&gt;. &lt;/p&gt;

</description>
      <category>dotnet</category>
      <category>csharp</category>
      <category>docker</category>
      <category>containerapps</category>
    </item>
    <item>
      <title>Deno is out. Is Node dead?</title>
      <dc:creator>Jaquiel Paim</dc:creator>
      <pubDate>Sun, 14 Jun 2020 18:00:31 +0000</pubDate>
      <link>https://dev.to/jaquiel/deno-is-out-is-node-dead-68k</link>
      <guid>https://dev.to/jaquiel/deno-is-out-is-node-dead-68k</guid>
      <description>&lt;p&gt;In 13th May 2020, finally Deno is out, after two years of its first release.&lt;/p&gt;

&lt;p&gt;For all the years of my career always I heard about the end of one or the other programing language or technology. So it was with Delphi, also PHP, within others. More recently it was the turn of the Node.Js.&lt;/p&gt;

&lt;p&gt;One day, maybe every programming language will die (&lt;em&gt;I'm not sure ...&lt;/em&gt;), but I really don't believe in the death of Node.js. At least not now.&lt;/p&gt;

&lt;h1&gt;
  
  
  But, what is Deno?
&lt;/h1&gt;

&lt;p&gt;As written in the Deno documentation, it is a secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust. You can see more details in &lt;a href="https://deno.land"&gt;https://deno.land&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Basically, Deno is a program for running JavaScript and TypeScript code outside of a browser, just like the Node.&lt;/p&gt;

&lt;p&gt;Deno was created by Ryan Dahl, the same creator of Node, but now with focus in security and productivity. It was announced by Dahl in 2018 during his talk "10 Things I Regret About Node.js" at &lt;a href="https://2018.jsconf.eu/"&gt;JSConf EU&lt;/a&gt; that year.&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/M3BM9TB-8yA"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction to Deno Features
&lt;/h1&gt;

&lt;p&gt;First, to start, we need to install Deno and this task is very easy for any operating system. See more at &lt;a href="https://deno.land/#installation"&gt;https://deno.land/#installation&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Deno is a command-line program. After its installation, you can get using the following commands to help you start works with it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno --h
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno --help
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To launch a Deno app you need simply use at the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno run &amp;lt;entry-point&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This entry point can be a JavaScript (&lt;em&gt;.js&lt;/em&gt;) file or TypeScript (&lt;em&gt;.ts&lt;/em&gt;) file. But the great news is the possibility to use a URL that points to an app entry point.&lt;/p&gt;

&lt;p&gt;Deno’s website provides some examples, like these.&lt;/p&gt;

&lt;p&gt;Let’s run it to see what happens.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno run https://deno.land/std/examples/welcome.ts
Download https://deno.land/std/examples/welcome.ts
Compile https://deno.land/std/examples/welcome.ts
Welcome to Deno 🦕
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deno downloaded the &lt;em&gt;&lt;code&gt;welcome.ts&lt;/code&gt;&lt;/em&gt; file, and compiled it, and ran it. If we run the app again, Deno will just run it, because it’s cached by Deno.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno run https://deno.land/std/examples/welcome.ts
Welcome to Deno 🦕
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Deno downloads all the modules and caches them. It will not download them again until you specifically request them with the &lt;em&gt;&lt;code&gt;reload flag&lt;/code&gt;&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno run --reload https://deno.land/std/examples/welcome.ts
Download https://deno.land/std/examples/welcome.ts
Compile https://deno.land/std/examples/welcome.ts
Welcome to Deno 🦕
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And the best so far is that when Deno runs the app, it only compiled the TypeScript file, that is, we don’t need to use any &lt;strong&gt;transpiler&lt;/strong&gt; for that.    &lt;/p&gt;

&lt;p&gt;It happens because Deno &lt;strong&gt;supports Typescript out of the box&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  EcmaScript modules vs. CommonJS
&lt;/h2&gt;

&lt;p&gt;Deno uses the last ECMAScript features in its API and libraries and because of the native support of ES Modules in Deno you don’t have to use other build tools to make your application ready to use in a browser.&lt;/p&gt;

&lt;p&gt;Deno supports ES Modules, instead of the CommonJS syntax used by Node. As a result, dependency management is very simple and flexible and it just uses a local or remote URL, but it provides compatibility with Node too.&lt;/p&gt;

&lt;p&gt;For example, require functions (&lt;em&gt;&lt;code&gt;require()&lt;/code&gt;&lt;/em&gt;) is not supported. The ES Modules standard syntax uses the import statement for that (&lt;em&gt;&lt;code&gt;import defaultExport from "module-name"&lt;/code&gt;&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;To load CommonJS modules you can use &lt;em&gt;&lt;code&gt;createRequire(...)&lt;/code&gt;&lt;/em&gt;, like the example below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createRequire&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://deno.land/std/node/module.ts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createRequire&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;import&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;url&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Loads native module polyfill.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;path&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Loads extensionless module.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cjsModule&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./my_mod&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// Visits node_modules.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;leftPad&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;left-pad&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;More details about that and examples like this can be seen at the link &lt;a href="https://deno.land/std/node"&gt;https://deno.land/std/node&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As we saw earlier, we can use a URL as an entry point to run a Deno application. And as we can also use a local or remote URL to manage the dependencies I created a repository on &lt;a href="https://github.com/jaquiel/deno-features/tree/master/std"&gt;GitHub&lt;/a&gt; to send some examples from Deno and I can simply import dependencies from there.&lt;/p&gt;

&lt;p&gt;I simply created a file called &lt;em&gt;&lt;code&gt;hello.ts&lt;/code&gt;&lt;/em&gt; that imports a &lt;em&gt;welcome.ts function&lt;/em&gt; that prints the same standard greeting message that we used in the previous examples.&lt;/p&gt;

&lt;p&gt;Let's see below the content of &lt;em&gt;&lt;code&gt;hello.ts&lt;/code&gt;&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;welcome&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;https://github.com/jaquiel/deno-features/raw/master/std/welcome.ts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="nx"&gt;welcome&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, the result of running the app.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno run hello.ts
Compile file:///C:/Users/jaquiel/Documents/vscode/deno/deno-features/std/hello.ts
Download https://github.com/jaquiel/deno-features/raw/master/std/welcome.ts
Download https://raw.githubusercontent.com/jaquiel/deno-features/master/std/welcome.ts
Welcome to Deno 🦕
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's really very &lt;em&gt;easy&lt;/em&gt; and &lt;em&gt;simple&lt;/em&gt; to work with Deno.&lt;/p&gt;

&lt;h1&gt;
  
  
  Security
&lt;/h1&gt;

&lt;p&gt;As previously seen, in Deno's own documentation it is defined as &lt;strong&gt;a secure runtime for JavaScript and TypeScript&lt;/strong&gt;. To access to security-sensitive areas or functions, you must use permissions on the command line.&lt;/p&gt;

&lt;p&gt;Let's see an example of the Deno website.&lt;/p&gt;

&lt;p&gt;Running without using the &lt;code&gt;--allow-net&lt;/code&gt; flag we will get the following result.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno run https://deno.land/std/examples/echo_server.ts
error: Uncaught PermissionDenied: network access to "0.0.0.0:8080", run again with the --allow-net flag
    at unwrapResponse ($deno$/ops/dispatch_json.ts:43:11)
    at Object.sendSync ($deno$/ops/dispatch_json.ts:72:10)
    at Object.listen ($deno$/ops/net.ts:51:10)
    at Object.listen ($deno$/net.ts:152:22)
    at https://deno.land/std/examples/echo_server.ts:4:23

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We can see that we had a permission denied error. But if we use the &lt;em&gt;flag&lt;/em&gt; the app will run without any problem.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ deno run --allow-net https://deno.land/std/examples/echo_server.ts
Listening on 0.0.0.0:8080
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the link &lt;a href="https://deno.land/manual/getting_started/permissions#permissions-list"&gt;https://deno.land/manual/getting_started/permissions#permissions-list&lt;/a&gt; , we can see the detailed list of all available permissions.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;Well, my goal wasn’t to explain Deno's features to you, because the documentation can help you understand it easily. Rather, I just wanted to try these advantages in practice. &lt;/p&gt;

&lt;p&gt;I reiterate my opinion that Node.js will not die and will not be replaced by Deno, because it is a well-established technology that will certainly remain for many years and, in addition,  its own creator developed Deno only as an alternative to Node, and not as a replacement.&lt;/p&gt;

&lt;p&gt;Finally, although I believe in a long life for Node I can't help saying that the new Deno’s features are truly exciting and it is, likely, the new Hype.&lt;/p&gt;

</description>
      <category>deno</category>
      <category>node</category>
      <category>javascript</category>
      <category>typescript</category>
    </item>
  </channel>
</rss>
