<?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>Forem: V. Rohan Rao</title>
    <description>The latest articles on Forem by V. Rohan Rao (@vrohan).</description>
    <link>https://forem.com/vrohan</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%2F445359%2F76e4d285-7455-4fef-8de2-7ab6da165f87.jpeg</url>
      <title>Forem: V. Rohan Rao</title>
      <link>https://forem.com/vrohan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/vrohan"/>
    <language>en</language>
    <item>
      <title>Deploy NodeJS applications to AWS or HEROKU</title>
      <dc:creator>V. Rohan Rao</dc:creator>
      <pubDate>Sun, 22 Nov 2020 15:30:42 +0000</pubDate>
      <link>https://forem.com/nitdgplug/deploy-nodejs-applications-to-aws-or-heroku-ill</link>
      <guid>https://forem.com/nitdgplug/deploy-nodejs-applications-to-aws-or-heroku-ill</guid>
      <description>&lt;h1&gt;
  
  
  &lt;center&gt;&lt;b&gt;The Premise.&lt;/b&gt;&lt;/center&gt;
&lt;/h1&gt;

&lt;p&gt;NodeJS revolutionised the back-end architecture worldwide. Ryan Dahl made server side Javascript possible, further strengthening the position of JavaScript as an indelible part of the Web as we know it today.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsutwo0vs54g2wblan6g8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fsutwo0vs54g2wblan6g8.png" alt="NodeJS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Starting at the grassroots level, often first-timers have to deploy their code to a production server, say for a Hackathon or some freelance work.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Heroku&lt;/strong&gt; and &lt;strong&gt;AWS&lt;/strong&gt; are the best choices for deployment right now, with their free plans nicely covering most of the needs for a first timer.&lt;/p&gt;

&lt;p&gt;Yet, deployment is a maze of it's own. Procfiles, environment variables, proxy settings, port exposing, it's a dire  stretch for a person trying to spin up a server for the first time.&lt;/p&gt;

&lt;p&gt;This article aims at helping you out to deploy your NodeJS apps.&lt;/p&gt;

&lt;p&gt;But the bigger question is  where to deploy?&lt;/p&gt;

&lt;p&gt;What exactly are the differences between Heroku and AWS? And what are the benefits of choosing one over the other?&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;center&gt;&lt;strong&gt;&lt;em&gt;Heroku vs AWS&lt;/em&gt;&lt;/strong&gt;&lt;/center&gt;
&lt;/h2&gt;

&lt;p&gt;Heroku is container-base cloud platform offering (&lt;strong&gt;PaaS&lt;/strong&gt;) whereas AWS is a secure cloud services platform providing &lt;strong&gt;IaaS&lt;/strong&gt;, &lt;strong&gt;PaaS&lt;/strong&gt; and &lt;strong&gt;SaaS&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;(&lt;strong&gt;I&lt;/strong&gt;nfrastructure/&lt;strong&gt;P&lt;/strong&gt;latform/&lt;strong&gt;S&lt;/strong&gt;oftware &lt;strong&gt;a&lt;/strong&gt;s &lt;strong&gt;a&lt;/strong&gt; &lt;strong&gt;S&lt;/strong&gt;ervice)&lt;/p&gt;

&lt;p&gt;Heroku is a easy to go solution for deploying if you are a beginner. You don’t have to actually worry about the infrastructure and scalability.&lt;/p&gt;

&lt;p&gt;AWS in the beginning can be very complicated but gives you more control on the infrastructure of  your site. So if you are beginner it’s better to try Heroku than configuring so many things in the AWS instance when you can get one step deployment solution by using Heroku.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So, let's begin, shall we?&lt;/em&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  &lt;center&gt;&lt;strong&gt;Deploying NodeJS Apps on Heroku&lt;/strong&gt;&lt;/center&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe5kk9w0eaprr4eg7e5ou.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fe5kk9w0eaprr4eg7e5ou.png" alt="Heroku Logo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will use Heroku CLI for deploying. &lt;/p&gt;

&lt;p&gt;Download Heroku CLI from &lt;a href="https://devcenter.heroku.com/articles/heroku-cli" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;After successfully installing the heroku cli run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;heroku login
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Change the directory to the project folder.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Specifying a start script&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To determine how to start your app, Heroku first looks for a Procfile. If no Procfile exists for a NodeJS app, we will &lt;br&gt;
attempt to start a default web process via the start script in your package.json.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;What is a Procfile?&lt;/em&gt; More on that below.&lt;/p&gt;

&lt;p&gt;The command in a web process type must bind to the port number specified in the PORT environment variable. If &lt;br&gt;
it does not, the dyno will not start.&lt;/p&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;&lt;em&gt;&lt;a href="https://devcenter.heroku.com/articles/dynos" rel="noopener noreferrer"&gt;What is a dyno?&lt;/a&gt;&lt;/em&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;All Heroku applications run in a collection of lightweight Linux containers called dynos.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;~ &lt;strong&gt;&lt;em&gt;Heroku DEV center&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;If you hardcode the port in your code, the deployment will fail.&lt;/p&gt;

&lt;p&gt;Make sure you use process.env.PORT in your code.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Add a Procfile&lt;/strong&gt;
&lt;/h3&gt;
&lt;h4&gt;
  
  
  &lt;strong&gt;&lt;em&gt;What is a Procfile?&lt;/em&gt;&lt;/strong&gt;
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;p&gt;Heroku apps include a Procfile that specifies the commands that are executed by the app on startup. You can use a Procfile to declare a variety of process types&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;~ &lt;em&gt;The &lt;a href="https://devcenter.heroku.com/articles/procfile" rel="noopener noreferrer"&gt;Heroku DEV center&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The Procfile, is a list of custom commands which are defined by certain keywords like &lt;code&gt;web&lt;/code&gt; or &lt;code&gt;worker&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These are steps and commands which have to be executed each time your app is started. Heroku executes all the processes in your Procfile in different &lt;code&gt;dynos&lt;/code&gt;, light-weight linux containers, which connect among each other.&lt;/p&gt;

&lt;p&gt;Create file with name Procfile (no extension) and add the line.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;web: node index.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  Build your app and run it locally
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Run the 'npm install' command in your local app directory to install the dependencies that you declared in your 
package.json file.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Start your app locally using the Heroku local command, which is installed as part of the Heroku CLI.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku local web
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Your app should now be running on &lt;a href="http://localhost:5000/" rel="noopener noreferrer"&gt;http://localhost:5000/&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Deploy your application to Heroku
&lt;/h3&gt;

&lt;p&gt;After you commit your changes to git, you &lt;strong&gt;can deploy your app to Heroku.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;git add .
&lt;/span&gt;&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;git commit -m "Added a Procfile."
&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;heroku login
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Enter your Heroku credentials.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="c"&gt;...
&lt;/span&gt;&lt;span class="gp"&gt;$&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;heroku create
&lt;span class="go"&gt;Creating arcane-lowlands-8408... done, stack is cedar
http://arcane-lowlands-8408.herokuapp.com/ | git@heroku.com:arcane-lowlands-8408.git
Git remote heroku added
&lt;/span&gt;&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;git push heroku master
...
-----&amp;gt; Node.js app detected
...
-----&amp;gt; Launching... done
       http://arcane-lowlands-8408.herokuapp.com deployed to Heroku
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To open the app in your browser, type-&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;heroku open.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  &lt;center&gt;&lt;strong&gt;Deploy NodeJS on AWS&lt;/strong&gt;&lt;/center&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fijj66b9ylg4il6ubmf48.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fijj66b9ylg4il6ubmf48.jpg" alt="AWS"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a very first step, We need to create a EC2 instance on the AWS, with &lt;strong&gt;Amazon Linux 2&lt;/strong&gt; as the OS of choice for your server, and ssh into it .&lt;/p&gt;

&lt;p&gt;After successful ssh into the EC2 instance , we need to follow the following steps to successfully deploy the NodeJS application.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install NodeJS and NPM&lt;/li&gt;
&lt;li&gt;Install Git and clone the repository with your project files.&lt;/li&gt;
&lt;li&gt;Install all the dependencies&lt;/li&gt;
&lt;li&gt;Install pm2 to run the server as a background process
configure the security group for the Ec2 instance&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1 – Install NodeJS and NPM&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Install NVM (Node Version Manager) by running the following command.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Activate nvm by typing the following at the command line&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;.&lt;/span&gt; ~/.nvm/nvm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Use nvm to install the latest version of NodeJS by typing the following 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;nvm install node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Installing NodeJS also installs the Node Package Manager (NPM) so you can install additional modules as needed.&lt;/p&gt;

&lt;p&gt;Test that NodeJS is installed and running correctly by typing the following 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;node -v
&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;npm -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2 – Installing Git and cloning the repository&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To install Git , run the following command in the terminal&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo yum install git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To verify whether Git was installed properly in the system or not run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git –version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Run the following command to clone the repository&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone &amp;lt;repository link&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3 – Installing the dependencies&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;change the directory to the cloned repo folder and run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 4 – Installing PM2 and starting the server&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;PM2 is a daemon process manager that will help you manage and keep your application online.&lt;/p&gt;

&lt;p&gt;Getting started with PM2 is straightforward, it is offered as a simple and intuitive CLI, installable via NPM.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A daemon (pronounced DEE-muhn) is a program that runs continuously and exists for the purpose of handling periodic service requests that a computer system expects to receive. The daemon program forwards the requests to other programs (or processes) as appropriate. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;~ &lt;strong&gt;&lt;em&gt;WhatIS.com&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A Daemon process is a program which runs as a background process, without the need of user interaction via terminal or a GUI. Running the node app as a daemon process enables you to access and execute other processes from your SSH session on your server, without which your node process will take up your current session's terminal.&lt;/p&gt;

&lt;p&gt;To install pm2 run the following command.&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo npm install pm2 -g
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To start the server run:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo pm2 start build/index.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;To delete a pm2 process run&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo pm2 delete &amp;lt;index no of the process&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 5 - Configure Security groups&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;By default, nobody can access the application without configuring the Inbound traffic configurations for the EC2 instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Quick explanation&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;The external IP dedicated to your EC2, only looks for SSH requests by default. Normal webpages, and REST APIs, mostly use the TCP protocol for data transfer. To make sure your server is secure and is not vulnerable to DDoS attacks (Distributed Denial Of Service), and to make sure that your assets and data remains secure.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;To make sure that front-end applications can send requests and receive responses from our NodeJS application, we will need to expose the port to incoming TCP connections by changing the security settings for our EC2 instance.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To configure Inbound traffic for the EC2 instance, follow the below steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Select the EC2 Instance and click on the security group link in the Description section.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By clicking the security group it will open the Security Group section. Here, we can configure Inbound and Outbound traffic properties. To make our application accessible from anywhere, click on the Inbound tab.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By clicking on the Edit button available in the Inbound tab, it will open Edit Inbound rules popup. By default, it will show SSH configurations.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;b&gt;Since our application is configured for port number as your required port, we need to add a new rule “Custom TCP Rule”.&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;Enter port range as your required port and select Source as “Anywhere”. After saving the changed rules, it will allow us to access our application from anywhere.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;That's it, folks!🎊 You've learnt successfully how to deploy your NodeJS application to production!&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;We hope you found this insightful.&lt;/strong&gt;&lt;br&gt;
Do visit our &lt;a href="https://nitdgplug.org/" rel="noopener noreferrer"&gt;website&lt;/a&gt; to know more about us and also follow us on :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.facebook.com/nitdgplug" rel="noopener noreferrer"&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.instagram.com/nitdgplug/" rel="noopener noreferrer"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/company/lugnitdgp/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UCYZPnN5vP5B1sINLLkI1aDA" rel="noopener noreferrer"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also do not forget to like and comment.&lt;/p&gt;

&lt;p&gt;Until then, &lt;br&gt;
&lt;strong&gt;stay safe, and May the Source Be With You!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcplzcsry6s5r8m1pale8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcplzcsry6s5r8m1pale8.gif" alt="Star Wars Who?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article was co-written by &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__user ltag__user__id__445359"&gt;
    &lt;a href="/vrohan" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F445359%2F76e4d285-7455-4fef-8de2-7ab6da165f87.jpeg" alt="vrohan image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/vrohan"&gt;V. Rohan Rao&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/vrohan"&gt;Always looking to learn more.&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;center&gt;AND&lt;/center&gt;
&lt;/h3&gt;


&lt;div class="ltag__user ltag__user__id__446710"&gt;
    &lt;a href="/deadlycoder07" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F446710%2F8a6bfb58-804d-46a1-9c9c-eee8482687fa.jpeg" alt="deadlycoder07 image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/deadlycoder07"&gt;Ramiz mollah&lt;/a&gt;Follow
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/deadlycoder07"&gt;exploring myself!&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>OpenSource and Data Privacy.</title>
      <dc:creator>V. Rohan Rao</dc:creator>
      <pubDate>Sun, 01 Nov 2020 09:27:27 +0000</pubDate>
      <link>https://forem.com/nitdgplug/opensource-and-privacy-3ljp</link>
      <guid>https://forem.com/nitdgplug/opensource-and-privacy-3ljp</guid>
      <description>&lt;p&gt;Let's face it. Each and everyone of us have heard that Big Tech is "stealing" our data, and misusing it. We've heard of anti-trust lawsuits, hearings, everything. But have we ever wondered what exactly is this "data" which they steal?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;And yes, why is it that big of a deal anyway?&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;center&gt;Let's see why it is.&lt;/center&gt;
&lt;/h2&gt;

&lt;p&gt;A lot of things come under the aegis of valuable data. If you're on your phone right now, and use Google Photos, open it up, there will be a mapping feature, which condenses your memories as heat signatures over a map for you to explore.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9YPNEXts--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fbhxwar0zbwtoovtkv1c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9YPNEXts--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/fbhxwar0zbwtoovtkv1c.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pretty cool, right?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NO.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Not only is this the biggest ad company out there, but it knows the exact time, date, location and the nature of your activity, the people there with you, what sort of a phone you were using, and can use all this data individually and together to build a profile on your &lt;strong&gt;&lt;em&gt;food, travel, socialising habits, interests and even financial and political beliefs.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And this is possible because most smartphone cameras store basic metadata about the photograph in your camera roll. There are ways to strip the metadata off of your photos, but by default this is how the system works.&lt;/p&gt;

&lt;h3&gt;
  
  
  And this is just your gallery.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--z1CozLax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qtoh1wp5xajj2564ycfa.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--z1CozLax--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/qtoh1wp5xajj2564ycfa.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;center&gt;Whatsapp and Signal.&lt;/center&gt;
&lt;/h2&gt;

&lt;p&gt;Whatsapp uses the open-source &lt;a href="https://github.com/signalapp/libsignal-protocol-rust"&gt;Signal Protocol&lt;/a&gt; for it's messaging end to end encryption. Well, it claims to, anyway. That often gives users the idea that all their data is secure on Whatsapp, as no one, not even Whatsapp, can read your messages. True. &lt;/p&gt;

&lt;p&gt;Completely honest? No.&lt;/p&gt;

&lt;p&gt;The message's metadata, like the &lt;em&gt;sender's&lt;/em&gt; and &lt;em&gt;receiver's mobile numbers&lt;/em&gt;, &lt;em&gt;the time of the message&lt;/em&gt;, and the &lt;em&gt;IP addresses of the devices involved in the transmission&lt;/em&gt;, are &lt;strong&gt;&lt;em&gt;still stored and recorded by Whatsapp&lt;/em&gt;&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This is still very much power in the hands of a Facebook owned company whose business model is based on completely closed source.&lt;/p&gt;

&lt;p&gt;This is again, the same company, which only recently has become transparent on the "off Facebook" activity which it logs. Basically all your other apps which you use on your phone.&lt;/p&gt;

&lt;p&gt;A very viable solution to the Whatsapp situation is Signal  itself, as it strips all messages of the message metadata, and removes location/time/device metadata from any messages, by default.&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;center&gt;We must Onion-ise 🧅&lt;/center&gt;
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J-7zf6sP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5jdqilmx0ufrp5nylktt.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J-7zf6sP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/5jdqilmx0ufrp5nylktt.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;TOR, The Onion Router, is a name you might have already heard, most probably in the context of the deep/dark web. In the words of the great Wikipedia,&lt;/p&gt;

&lt;p&gt;"Tor is a free and open-source software for enabling anonymous communication."&lt;/p&gt;

&lt;p&gt;Chrome is also built upon the open-source browser Chromium developed by Google.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/chromium"&gt;
        chromium
      &lt;/a&gt; / &lt;a href="https://github.com/chromium/chromium"&gt;
        chromium
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      The official GitHub mirror of the Chromium source
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;However, it comes with &lt;strong&gt;minimal privacy protection measures&lt;/strong&gt;, and if you think about it, Google being the largest online advertising firm (with Google Ads), it's against their interest to stop websites from collecting your data.&lt;/p&gt;

&lt;p&gt;So they don't. &lt;em&gt;Cookies persist on your machine unless you manually clear them&lt;/em&gt;, a simple browser scrape will dump every-single info about your local PC configuration( &lt;em&gt;including IPs&lt;/em&gt;), its literally an open-for-all data buffet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is where TOR differs from Chrome.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The internal workings of TOR are beyond the scope of this article, yet its implications are not.&lt;/p&gt;

&lt;p&gt;TOR's data encryption at every step throughout its global network relay keeps your identity hidden, thus making it almost impossible for any meaningful data to be extracted from your online activity.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;No IPs, no locations, your online identity remains protected.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;And it being open-source drastically reduces the time of the feedback-patch loop, as vulnerabilities are detected and patched super quick. The amount of data collection that occurs even at the smallest of websites when using something like Chrome is almost mind-numbing. Use TOR, get some peace of mind.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gitlab.torproject.org/tpo"&gt;Here's the code for it&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, there is a caveat to all this power. Websites can detect when you are using TOR, and may choose to restrict access to some content, or even the site itself. Wikipedia, for example, does not let you edit articles if you are using TOR.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is where we suggest another, much more robust solution to the online privacy problem.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  &lt;center&gt;VPNs&lt;/center&gt;
&lt;/h1&gt;

&lt;p&gt;Ah yes, Virtual Private Networks.&lt;/p&gt;

&lt;p&gt;The magical thing every single one of your favourite Youtubers seem to be advertising these days.&lt;/p&gt;

&lt;p&gt;All your data encrypted, access to location restricted content, it all sounds magical indeed. But it comes at a price, literally.&lt;/p&gt;

&lt;p&gt;VPNs, at least the ones you should trust, are usually subscription based services. VPNs are the best solution we have to this online privacy problem.&lt;/p&gt;

&lt;p&gt;Popular VPNs include ExpressVPN and NordVPN (yes, I only know two of these, I watch the same Youtubers as you) provide you privacy in exchange for a premium price tag.&lt;/p&gt;

&lt;p&gt;However there is a potential catch to this as well. Encryption occurs before data is sent out on the web, but how can you be sure that your VPN itself is not collecting your data prior to encryption?&lt;/p&gt;

&lt;p&gt;Again, a classic&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Who shall watch the watchers?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;scenario.&lt;/p&gt;

&lt;p&gt;This privacy business really is a pain in the compiler. Well I may still have and option for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;center&gt;ProtonVPN &lt;/center&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4iKj7rdz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zggtqf4gqye0383htroh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4iKj7rdz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zggtqf4gqye0383htroh.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You may have heard of Proton before, they provide the secure email service ProtonMail as well. ProtonVPN is also a premium service, although it does have a free tier.&lt;/p&gt;

&lt;p&gt;ProtonVPN is different from the other services owing to the fact that its client applications are all open-source&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/ProtonVPN"&gt;
        ProtonVPN
      &lt;/a&gt; / &lt;a href="https://github.com/ProtonVPN/linux-cli"&gt;
        linux-cli
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Linux command-line client for ProtonVPN. Written in Python.
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Any data collection that may occur has to take place at the client level itself. &lt;strong&gt;Having the client source code open source means we can easily go through it and check for shenanigans anytime we want.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is a huge power move on the part of ProtonVPN to prove their stand on the no-data-collection policy.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;center&gt;Privacy, ground up.&lt;/center&gt;
&lt;/h2&gt;

&lt;p&gt;Windows, remains by far, the most popular consumer desktop operating system. As an open-source club, the fact that Windows is completely proprietary, raises a lot of issues, but a few recent developments, have made the case very weak for Team Redmond.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Windows shows ads for various services, directly baked into the Start menu, Lock Screen, Action Center and Notifications even.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is an operating system, which still sells licenses for it's real, fully-fledged copies. Forget safer networking, if advertisement APIs are baked into the very core of your OS, how can you ever be certain of their intentions?&lt;/p&gt;

&lt;p&gt;Add to that DLL hell and Registry hell in Windows, and even third party applications can access sensitive permissions and data on a very trivial basis.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Let's see open source solutions to this.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6811qqCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z9wjn9w1riiv43z6t7gp.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6811qqCt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/z9wjn9w1riiv43z6t7gp.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is Tails OS. Tails is an operating system which can be run in it's complete form from a thumb-drive, and has default network configuration to use Tor in all it's networking functions. It wipes all files, passwords applications as a part of it's amnesic approach, and doesn't interact with the hard disk of the system you're using as a system for it's Live system.&lt;/p&gt;

&lt;p&gt;You can check out their code &lt;a href="https://gitlab.tails.boum.org/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;There a lot of other privacy focused Linux distributions, like Qubes OS, which containerizes all applications to run independently, disallowing Read-Write access and network permissions on a granular level.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/QubesOS"&gt;
        QubesOS
      &lt;/a&gt; / &lt;a href="https://github.com/QubesOS/qubes-core-agent-linux"&gt;
        qubes-core-agent-linux
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Qubes component: core-agent-linux
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;These are a few of the many, many technologies out there which promise internet anonymity. This might seem like a small deal, but in a world where companies like Cambridge Analytica try to  influence global elections with news and counter fake news, wherein activists and journalists are hunted down for telling the truth, small steps, that's all we can take.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Data privacy being an actual issue might seem like some paranoid dystopia,but with us being at cusp of the AR/VR boom, wherein, wearable cameras will become a part of daily lives, it is important to take a step back, and look at where are we heading.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Until then, we must persevere.&lt;/strong&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;We hope you found this insightful.&lt;/strong&gt;&lt;br&gt;
Do visit our &lt;a href="https://nitdgplug.org/"&gt;website&lt;/a&gt; to know more about us and also follow us on :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.facebook.com/nitdgplug"&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.instagram.com/nitdgplug/"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/company/lugnitdgp/"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UCYZPnN5vP5B1sINLLkI1aDA"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also do not forget to like and comment.&lt;/p&gt;

&lt;p&gt;Until then, &lt;br&gt;
&lt;strong&gt;stay safe, and May the Source Be With You!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sZInPlPk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cplzcsry6s5r8m1pale8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sZInPlPk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cplzcsry6s5r8m1pale8.gif" alt="Star Wars Who?"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article was co-written by &lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag__user ltag__user__id__431923"&gt;
  
    .ltag__user__id__431923 .follow-action-button {
      background-color: #d7dee2 !important;
      color: #022235 !important;
      border-color: #d7dee2 !important;
    }
  
    &lt;a href="/knightvertrag" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--KaIrlg2o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--jgP-z1g6--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/431923/ada2407b-4509-408c-b556-9944ffb4801e.png" alt="knightvertrag image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/knightvertrag"&gt;Anurag Mondal&lt;/a&gt;
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/knightvertrag"&gt;A student trying to learn as much as humanly possible&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  &lt;center&gt;AND&lt;/center&gt;
&lt;/h3&gt;


&lt;div class="ltag__user ltag__user__id__445359"&gt;
  
    .ltag__user__id__445359 .follow-action-button {
      background-color: #1fe069 !important;
      color: #000000 !important;
      border-color: #1fe069 !important;
    }
  
    &lt;a href="/vrohan" class="ltag__user__link profile-image-link"&gt;
      &lt;div class="ltag__user__pic"&gt;
        &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JUxPNdhJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--j6gXdqlT--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/445359/76e4d285-7455-4fef-8de2-7ab6da165f87.jpeg" alt="vrohan image"&gt;
      &lt;/div&gt;
    &lt;/a&gt;
  &lt;div class="ltag__user__content"&gt;
    &lt;h2&gt;
&lt;a class="ltag__user__link" href="/vrohan"&gt;V. Rohan Rao&lt;/a&gt;
&lt;/h2&gt;
    &lt;div class="ltag__user__summary"&gt;
      &lt;a class="ltag__user__link" href="/vrohan"&gt;Always looking to learn more.&lt;/a&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>opensource</category>
      <category>datascience</category>
      <category>security</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Framer Motion API for React</title>
      <dc:creator>V. Rohan Rao</dc:creator>
      <pubDate>Sun, 13 Sep 2020 14:34:07 +0000</pubDate>
      <link>https://forem.com/nitdgplug/a-page-worth-being-framed-34c7</link>
      <guid>https://forem.com/nitdgplug/a-page-worth-being-framed-34c7</guid>
      <description>&lt;h2&gt;
  
  
  The Exposition.
&lt;/h2&gt;

&lt;p&gt;We've all been there. Looking at those beautiful animations on so many webpages and looking at our own CSS,sighing at the wire-frame we spent hours on, and googling how to center a div. And don't get us wrong. That is, the way you learn, and of course, Codepen.🌚 &lt;/p&gt;




&lt;p&gt;But front-ends are important. Some would argue as important as the core back-end of your webapp. After all, it's the part everyone sees, everyone watches, looks for mistakes, wows at it's beauty, snorts their derision at it's design. And this brings us to the Framer. The online, free prototyping tool for front-end designing and animation ...&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/hAPxeoP8wn8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;... without writing any code.&lt;/p&gt;

&lt;p&gt;Uh, no, thankyou.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Spells.
&lt;/h2&gt;

&lt;p&gt;Thankfully(?), though, their Motion API for React is open-source as a NPM package, and you can combine it with your CSS to animate various components as you feel the need. (Hey, I said better animations, not lesser work.)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AaJIMifJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/08cpmyj0eha6tr5rtsfe.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AaJIMifJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/08cpmyj0eha6tr5rtsfe.gif" alt="Framer Motion"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You'll need a React based project for this. So, Vue and Angular gang, there's another cap in Facebook's cap.&lt;/p&gt;

&lt;p&gt;Moving ahead, this isn't a Vue vs Angular vs React debate, that has been 'settled for good', multiple times to be even relevant anymore.&lt;/p&gt;

&lt;p&gt;So, what exactly is &lt;em&gt;Framer Motion API&lt;/em&gt;? Does it accomplish anything CSS can't?&lt;/p&gt;

&lt;p&gt;NO.&lt;/p&gt;

&lt;p&gt;So, isn't it useless? &lt;strong&gt;NO&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It's not what is done, but how quickly and easily it is done, if not the most efficiently is what counts. DO NOT quote us on this, this is how most APIs/frameworks are conceptualised.&lt;/p&gt;

&lt;p&gt;And face it, if we went by those definitions, most new JavaScript frameworks will be rendered useless.(Most are.)&lt;/p&gt;

&lt;p&gt;Create your react project.&lt;/p&gt;

&lt;p&gt;Firstly install the npm package by heading over to terminal and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;npm install framer-motion
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;and press Enter.&lt;/p&gt;

&lt;p&gt;Framer Motion API works in a very simple way. You import the motion component from the framer-motion npm package in the page or component file as per your need.&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;motion&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;framer-motion&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;And then you can declare motion components instead of classic HTML/JSX components. like,&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;motion&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;instead of&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="p"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nt"&gt;div&lt;/span&gt;&lt;span class="p"&gt;/&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;All these alternate components come with a lot of configurable values for animation, transformation, even hard-coded in-line CSS, and even GPU accelerated graphics.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Magic.
&lt;/h2&gt;

&lt;p&gt;Check this slightly accelerating toggle.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/2zbg4"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Or this scroll dependent animation...&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/y0wpc"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Or this shape-shifting object for your brand logo.&lt;/p&gt;

&lt;p&gt;&lt;iframe src="https://codesandbox.io/embed/c6skk"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Pretty neat, huh? The Example.tsx in the last sandbox has only 21 lines of code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now, that's concise.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Again, we aren't saying that the Framer online tool is bad. But again, we discuss primarily the coding. If someone can spin up breathtaking visuals with an acute knowledge of classical styling, kudos to them. But the API will allow a lot of developers to create something beautiful. Magical, even. &lt;/p&gt;

&lt;p&gt;And at the end of the day, that's what it is all about. &lt;/p&gt;

&lt;p&gt;Check it out here: &lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vJ70wriM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/framer"&gt;
        framer
      &lt;/a&gt; / &lt;a href="https://github.com/framer/motion"&gt;
        motion
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Open source, production-ready animation and gesture library for React
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;



&lt;p&gt;And the API documentation &lt;a href="https://www.framer.com/motion/"&gt;here.&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;We hope you found this insightful.&lt;/em&gt;&lt;br&gt;
Do visit our &lt;a href="https://nitdgplug.org/"&gt;website&lt;/a&gt; to know more about us and also follow us on :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.facebook.com/nitdgplug"&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.instagram.com/nitdgplug/"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/company/lugnitdgp/"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UCYZPnN5vP5B1sINLLkI1aDA"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also do not forget to like and comment.&lt;/p&gt;

&lt;p&gt;Until then, &lt;br&gt;
&lt;em&gt;stay safe, and May the Source Be With You!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sZInPlPk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cplzcsry6s5r8m1pale8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sZInPlPk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cplzcsry6s5r8m1pale8.gif" alt="Star Wars Who?"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>ux</category>
      <category>webdev</category>
      <category>javascript</category>
    </item>
    <item>
      <title>sort("NODE") --&gt; DENO</title>
      <dc:creator>V. Rohan Rao</dc:creator>
      <pubDate>Fri, 07 Aug 2020 13:02:56 +0000</pubDate>
      <link>https://forem.com/nitdgplug/sort-node-deno-4nck</link>
      <guid>https://forem.com/nitdgplug/sort-node-deno-4nck</guid>
      <description>&lt;p&gt;The first thing to keep in mind while discussing &lt;a href="https://doc.deno.land/"&gt;deno&lt;/a&gt; is to remember &lt;em&gt;dino&lt;/em&gt; would have been a much cooler name. &lt;em&gt;Kidding&lt;/em&gt;, what we have to remember, is that it is still in early stages and not perfect for production, yet.As &lt;strong&gt;Ryan Dahl&lt;/strong&gt; has himself pointed out, it is for enthusiasts and if you aren’t one, or looking for support for your production level projects, then use &lt;a href="https://nodejs.org/en/"&gt;Node&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xksB_PTo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ys07nw1oa642g6scfqdg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xksB_PTo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ys07nw1oa642g6scfqdg.png" alt="It's not for everyone."&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that we are done with the disclaimers, let’s dive straight into deno. It is amazing!         &lt;/p&gt;

&lt;p&gt;  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;WHAT IS DENO?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;  &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C97CD_b3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xoa31k9gyxoeaqhofzxf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C97CD_b3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xoa31k9gyxoeaqhofzxf.png" alt="Deno logo"&gt;&lt;/a&gt;&lt;br&gt;
  &lt;br&gt;
Deno is a Javascript framework, which enables server side JavaScript execution, much like NodeJS. They even share the letters making their names. Both of them were conceptualised by Ryan Dahl, although at very different times.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;WHY Deno?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;As developers, we have one singular dev whose code structure and execution always lets us down. Namely, our past selves. Ryan Dahl is no different. As simple and intuitive and honestly good NodeJS has been, there were very deep rooted issues in it’s very basic structure and execution, which Ryan has since come to regret.&lt;/p&gt;

&lt;p&gt;And to remove so many issues with how he had approached Node, it wouldn’t be possible without crashing a lot of projects which use Node for their production servers.Not to mention, Ryan has moved away from NodeJS and Joyent, the once sponsor, but now maintainer of NodeJS.(sort-of?) Joyent was acquired by Samsung later on. NodeJS still remains open-source, but a lot of issues have cropped up in it. Also it's development is governed by the OpenJS Foundation, formed in turn by merging the NodeJS Foundation and the JS Foundation.&lt;br&gt;
 &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C2mX_EoU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lc5qa4f958lbgkqvi8oj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C2mX_EoU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/lc5qa4f958lbgkqvi8oj.png" alt="Joyent"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;  &lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;So, What’s different?&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;JavaScript as a language has changed a lot and a few of these changes wouldn’t have been possible in 2009.&lt;/strong&gt;&lt;br&gt;
 &lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;CONSTRUCTION&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;NodeJS is based on C++, which uses the GYP auto build tool. It is important to note that the V8 engine, used  for running JS, moved away from GYP to GN, and that just adds unnecessary complexity.&lt;/p&gt;

&lt;p&gt;Deno on the other hand, is based on Rust, a relatively new programming language, which allows sandboxing of the code from a very elementary perspective. Rust promises the same efficiency and speed as C++, while giving fundamentally better security.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;TYPESCRIPT&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Deno introduces native TypeScript support, out of the box. Typescript can be enabled on Node as well, but integrated support breathes a fresh lease of Life, and allows code to be simpler and to be easily debuggable.&lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;WINDOW OBJECT&lt;/strong&gt;
&lt;/h3&gt;
&lt;h4&gt;
  
  
  &lt;em&gt;Goodbye axios, hello fetch.&lt;/em&gt;
&lt;/h4&gt;

&lt;p&gt;The heading is one of the few changes which will be possible due to deno keeping the window object, which is traditionally native to web browsers. Since even the document object is an object of window, all native JavaScript window methods and functions have native support in deno. And that is one of the themes which oversee deno’s thinking. I’m of course referring to Deno’s native support for &lt;strong&gt;&lt;em&gt;Promises&lt;/em&gt;&lt;/strong&gt;, which were ironically added in NodeJS in 2009, and subsequently revoked in 2010. Promises are the best abstraction for async/await working, and Ryan believes that it would have simplified things to a great extent and made NodeJS even better.&lt;/p&gt;

&lt;p&gt;  &lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;A CENTRALISED PACKAGE MANAGER (or the lack thereof)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--afBA1ajz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tp59e45xl2la9ke310a0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--afBA1ajz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/tp59e45xl2la9ke310a0.png" alt="GitHub x npm"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NPM&lt;/strong&gt; or node package manager is the default package manager for NodeJS. &lt;strong&gt;NPM&lt;/strong&gt; is a private entity, and yet an open source framework is dependent on it. So, a open source framework,has it’s primary package manager owned directly by &lt;em&gt;GitHub&lt;/em&gt;.(read &lt;strong&gt;&lt;em&gt;Microsoft&lt;/em&gt;&lt;/strong&gt;). This risks the entire future of NodeJS projects around the world, in the eventuality that Microsoft decides to shut it. Even if it was an independent organisation, a centralised dependency place wherein projects are interdependent on each other’s existence is not a good idea. And add to that ES6 allows you to use native import statements along with Web CDNs.&lt;/p&gt;

&lt;p&gt;In a deno .ts or a .js file,&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;serve&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="err"&gt;“&lt;/span&gt;&lt;span class="nx"&gt;https&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="c1"&gt;//deno.land/std@0.63.0/http/server.ts";&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That’s all that is needed.&lt;/p&gt;

&lt;p&gt;Deno caches the dependency in your local storage during the first time and then uses that cache for subsequent operations.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Deno does have a centralized collection of standard modules that do not have external dependencies and are reviewed by the Deno core team; it lives on the deno.land server. The deno_std module collection is a loose port of Go’s standard library.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;But these can be thought of more like building blocks.&lt;br&gt;
 &lt;/p&gt;
&lt;h3&gt;
  
  
  &lt;strong&gt;Insecure file system and network practices (or the lack thereof)&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Any time you type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;node index.js
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your terminal, it immediately grants filesystem and network access to your index.js file and all the node_modules dependencies the application ‘requires’.&lt;/p&gt;

&lt;p&gt;What this means is that if masked properly, an npm package can be configured in a way which compromises the end user’s security, or herein, the servers. Although it is possible to containerise applications, it is still a design flaw.&lt;/p&gt;

&lt;p&gt;Deno fixes these basic flaws by simply mandating flags be added during running the application. Without the user explicitly providing access during runtime, the code cannot execute file structure accessing or network commands, in any way.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;deno run --allow-net app.ts
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This only gives the network permission&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;deno run --alow-write app.ts
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This only gives Filesystem access.&lt;/p&gt;

&lt;p&gt;You can choose explicitly what permissions you wish to give your script.&lt;/p&gt;

&lt;p&gt;  &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Setting up a basic server on Deno&lt;/strong&gt;
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open your IDE/Text Editor/Terminal and make a new TypeScript or JavaScript file&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Type the following in it:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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;serve&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://deno.land/std/http/server.ts&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;serve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;port&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;await&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;req&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;s&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="nx"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;respond&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Hola, DEV.to&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Save and open terminal and type.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;deno run {name of file}.extension
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll get an error like this :&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PlHfDz1K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w43sdekxoa4pjf613jsb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PlHfDz1K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/w43sdekxoa4pjf613jsb.png" alt="Give me my permissions &amp;gt;&amp;lt;!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We did not allow deno to use the network in the first place!&lt;/p&gt;

&lt;p&gt;Go back and type:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;deno run --allow-net {name of file}.extension
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now it will work perfectly, go to your specified localhost port on your browser, annnnnd &lt;em&gt;voila!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FzNJskpn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/utpdivza6d3t52xchsij.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FzNJskpn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/utpdivza6d3t52xchsij.png" alt="Success!!!"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This was a fresh look on Deno. The latest release on August 1, 2020 and is v1.2.2&lt;/p&gt;

&lt;p&gt;Check it out &lt;a href="https://github.com/denoland/deno"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, folks, that was Deno. A re-thinking of a very popular technology, making it better in almost every way imaginable. Ryan claims that it isn't aimed at replacing Node, but it is really hard not to see the potential here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;However,&lt;/strong&gt;  &lt;em&gt;(*TnC apply)&lt;/em&gt;&lt;br&gt;
Deno, contrary to popular belief, is actually like a small bird (which is good, birds came from dinosaurs afterall) and its gonna take time before it becomes the battle tested T-rex we all want it to be.&lt;br&gt;
 &lt;/p&gt;




&lt;p&gt;&lt;strong&gt;We hope you found this insightful.&lt;/strong&gt;&lt;br&gt;
Do visit our &lt;a href="https://nitdgplug.org/"&gt;website&lt;/a&gt; to know more about us and also follow us on :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.facebook.com/nitdgplug"&gt;Facebook&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.instagram.com/nitdgplug/"&gt;Instagram&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.linkedin.com/company/lugnitdgp/"&gt;Linkedin&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/channel/UCYZPnN5vP5B1sINLLkI1aDA"&gt;YouTube&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Also do not forget to like and comment.&lt;/p&gt;

&lt;p&gt;Until then, &lt;br&gt;
&lt;strong&gt;stay safe, and May the Source Be With You!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sZInPlPk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cplzcsry6s5r8m1pale8.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sZInPlPk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/cplzcsry6s5r8m1pale8.gif" alt="Star Wars Who?"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>webdev</category>
      <category>node</category>
      <category>deno</category>
    </item>
  </channel>
</rss>
