<?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: Shubham Gupta</title>
    <description>The latest articles on DEV Community by Shubham Gupta (@shubhamggupta).</description>
    <link>https://dev.to/shubhamggupta</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%2F387211%2F71b6df2a-4c69-4d22-8b37-5a127e278cc8.jpg</url>
      <title>DEV Community: Shubham Gupta</title>
      <link>https://dev.to/shubhamggupta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shubhamggupta"/>
    <language>en</language>
    <item>
      <title># REPL in node.js</title>
      <dc:creator>Shubham Gupta</dc:creator>
      <pubDate>Mon, 18 May 2020 07:28:47 +0000</pubDate>
      <link>https://dev.to/shubhamggupta/repl-in-node-js-490e</link>
      <guid>https://dev.to/shubhamggupta/repl-in-node-js-490e</guid>
      <description>&lt;p&gt;REPL is nothing but a virtual environment. The job of REPL is to test a simple node and javascript code. Like another programming language, for example, java spring boot for the simple test application you have to create a whole project but with node.js with the help of REPL you can perform the quick operation without creating any project. You can start the REPL environment by just typing the node on the shell, REPL stands for Read_Eval_Print_Loop, which means.&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="nx"&gt;R&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;READ&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Read&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;
&lt;span class="nx"&gt;E&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;Evaluate&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Evaluate&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;
&lt;span class="nx"&gt;P&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;Print&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Print&lt;/span&gt; &lt;span class="nx"&gt;Output&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;L&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;Loop&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Wait&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  open command prompt or terminal (in Window or Mac or UNIX/Linux) and type node.
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XSysS1dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AYYsq_1HoNfmLbmwMOLR0lQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XSysS1dz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AYYsq_1HoNfmLbmwMOLR0lQ.jpeg" alt="Please Reload"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  you can do many operations using variables and different types of expressions.
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Simple Expression&lt;/strong&gt;:- A simple addition, subtraction, multiplication, division you can do in the console. for example - enter 4 + 3 it will give you a result 7. All normal expression you can don in REPL&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2GlHpck7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AWMIlmeqXU-1RkFNPhq1jIQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2GlHpck7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2AWMIlmeqXU-1RkFNPhq1jIQ.jpeg" alt="Please Reload"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiline Expression&lt;/strong&gt;:- You can mention conditions and statements or function inside the terminal and perform different operations. Node REPL also supports loops and multiline expressions. as shown below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7Uy2z62R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2Aoo1dpCpiPII3Pyn0zuMfzg.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7Uy2z62R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2Aoo1dpCpiPII3Pyn0zuMfzg.jpeg" alt="Please Reload"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Use of Variable&lt;/strong&gt;:- You can also declare a variable in the console. The variable allows you to store the value into variable to print the value of the variable you can simply console it with the help of console.log()&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8QDl3mHy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2A7nZGDIgwMmfn7j9FyaAurQ.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8QDl3mHy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1400/1%2A7nZGDIgwMmfn7j9FyaAurQ.jpeg" alt="Please Reload"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can read more about REPL from official docs. &lt;a href="https://nodejs.org/api/repl.html"&gt;click here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Medium article &lt;a href="https://medium.com/@shubhamggupta/repl-in-node-js-c8c66925bad5"&gt;click here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@shubhamggupta"&gt;Medium Profile&lt;/a&gt;&lt;br&gt;
°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°°&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>npm</category>
      <category>typescript</category>
    </item>
    <item>
      <title># Template Literals in javascript</title>
      <dc:creator>Shubham Gupta</dc:creator>
      <pubDate>Sat, 16 May 2020 19:10:38 +0000</pubDate>
      <link>https://dev.to/shubhamggupta/template-literals-in-javascript-4p30</link>
      <guid>https://dev.to/shubhamggupta/template-literals-in-javascript-4p30</guid>
      <description>&lt;p&gt;In a javascript, there was a different way of writing a string. the most common method is to use single and double quotes, for example&lt;/p&gt;

&lt;pre&gt;
'String by a single quote'
         and 
"String by a double quote"
&lt;/pre&gt;

&lt;p&gt;There was one more way through that you can write a string and that is backticks(`)&lt;/p&gt;

&lt;pre&gt;
`String by a backtick`
&lt;/pre&gt;

&lt;p&gt;Now why we should use this, the answer is With that syntax, you can dynamically add data into a string like this:&lt;/p&gt;

&lt;pre&gt;
const city= "Pune";
const country = "India";
console.log(`My current city is ${city} and which is located in ${country});

final result:- My current city is Pune and which is located in India
&lt;/pre&gt;

&lt;p&gt;There was an "old" way of concatenating strings:&lt;/p&gt;

&lt;pre&gt;
"My current city is "+city+" and which is located in "+country
&lt;/pre&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>npm</category>
      <category>typescript</category>
    </item>
    <item>
      <title># Understanding the Role and Usage of Node.js</title>
      <dc:creator>Shubham Gupta</dc:creator>
      <pubDate>Sat, 16 May 2020 17:00:47 +0000</pubDate>
      <link>https://dev.to/shubhamggupta/understanding-the-role-and-usage-of-node-js-2mn2</link>
      <guid>https://dev.to/shubhamggupta/understanding-the-role-and-usage-of-node-js-2mn2</guid>
      <description>&lt;p&gt;When a user interacts with our web site there may be a chance when it performs some operation like registration, login, or posts anything. For example, the user performs a login operation, the user could unhook the validation javascript from the controls. Mostly the Client Side Validation depends on the JavaScript Language, so if users turn JavaScript off, it can easily bypass and submit dangerous input to the server. So the Client Side Validation can not protect your application from malicious attacks on your server resources and databases. therefore node.js comes into the picture. with the help of the node.js, we can perform all these operations on the server.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ay53wJNf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/980/1%2AzyPkYiWEjIy3qKPqVWjXxQ.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ay53wJNf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/980/1%2AzyPkYiWEjIy3qKPqVWjXxQ.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Node.js, can perform server-side validation, database connection, authentication, and write our business logic.&lt;br&gt;
The huge advantage of node.js is that it uses javascript, a language which you need so much in modern web development for all the frontend, for some build tool and if you then can also use it on their server-side you don’t need to learn a bunch of different languages you can use the same language.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Node.js Role (In Web Development)&lt;/strong&gt;
&lt;/h2&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Run Server&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;Create Server and listen to the incoming request&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Business Logic&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;Handle Request, Validate Input, Connect to Database&lt;/p&gt;

&lt;h5&gt;
  
  
  &lt;strong&gt;Response&lt;/strong&gt;
&lt;/h5&gt;

&lt;p&gt;Return Response&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>codequality</category>
    </item>
    <item>
      <title># Introduction to Node.js</title>
      <dc:creator>Shubham Gupta</dc:creator>
      <pubDate>Sat, 16 May 2020 06:48:55 +0000</pubDate>
      <link>https://dev.to/shubhamggupta/introduction-to-node-js-j8</link>
      <guid>https://dev.to/shubhamggupta/introduction-to-node-js-j8</guid>
      <description>&lt;p&gt;Node.js is a runtime javascript, well node.js uses V8, and V8 simply is the name of a javascript engine built by google that runs javascript in the browser.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hG33UcHa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1031/1%2A2RqYMpvCRYwTn704430qDA.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hG33UcHa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://miro.medium.com/max/1031/1%2A2RqYMpvCRYwTn704430qDA.png" alt="Alt text of image"&gt;&lt;/a&gt;&lt;br&gt;
V8 is the simply named, the creator gave their engine and what does the engine mean. It means that the engine takes javascript code and compiles it to machine code, V8 itself is written in C++&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What Node.js does ?&lt;/strong&gt;&lt;br&gt;
It allows you to run javascript on your computer and it adds useful functionalities to the javascript engine so that you can do more stuff there (like file handling etc). with the help of node.js, you can build web app, RESTful API, Chat app, and more&lt;/p&gt;

&lt;p&gt;Next Article &lt;a href="https://dev.to/shubhamggupta/understanding-the-role-and-usage-of-node-js-2mn2"&gt;Role of Node.js&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Find my medium post &lt;a href="https://medium.com/@shubhamggupta/node-js-introduction-3de32effbe30"&gt;Click here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>tutorial</category>
      <category>codequality</category>
    </item>
  </channel>
</rss>
