<?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: Dimitris Chitas</title>
    <description>The latest articles on DEV Community by Dimitris Chitas (@feco2019).</description>
    <link>https://dev.to/feco2019</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%2F541403%2Fe13a78ce-bc2b-4715-990e-87a922b1e8d6.jpg</url>
      <title>DEV Community: Dimitris Chitas</title>
      <link>https://dev.to/feco2019</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/feco2019"/>
    <language>en</language>
    <item>
      <title>Do you really understand how color theories based(RYB,CMYK, RGB models)?</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Tue, 24 Aug 2021 23:22:50 +0000</pubDate>
      <link>https://dev.to/feco2019/do-you-really-understand-how-color-theories-based-ryb-cmyk-and-rgb-models-1pjg</link>
      <guid>https://dev.to/feco2019/do-you-really-understand-how-color-theories-based-ryb-cmyk-and-rgb-models-1pjg</guid>
      <description>&lt;p&gt;Hello there guys.&lt;/p&gt;

&lt;p&gt;I hope my thread finds you in your best,wealthy as well healthy and full of appetite for some historical topics that can be discussed easily.&lt;/p&gt;

&lt;h1&gt;
  
  
  Do you know what is RYB, RGB and CMYK models?
&lt;/h1&gt;

&lt;p&gt;We can discuss this topic for days and it could settle by different statements. I know it, so &lt;br&gt;
for the history of the future i 'ill keep it simple,as much simple you could keep this kind of threads :P.&lt;/p&gt;

&lt;h1&gt;
  
  
  RYB Model History Reference :
&lt;/h1&gt;

&lt;p&gt;Stands for term of the Red - Yellow and Blue.&lt;br&gt;
The history behind it comes around 1500 after of some mixing references from Scientist's Projects/Paintings like Anselmus de Boodt such as architects-scientists like François d'Aguilon who is also the central point of the most applied version of the theory with the unfinished project of Opticorum libri sex, 1613 because of his death.&lt;/p&gt;

&lt;p&gt;The real "activist" of the idea performance  called Jacob Christoph Le Blon a painter and engraver as well who invented the three and four color printing using the RYB model with the usage of mezzotint he could printing wide range of colors.But that is the past let's focus what real RYB is stands for in practice.&lt;/p&gt;

&lt;h1&gt;
  
  
  RYB what you need to remember:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The RYB color model is a method for mixing different artists paints and opaque pigments to produce other colors. It is called a subtractive color model (a subtractive approach to color).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The name of the RYB colour model comes from the initials of its three primary colours – red, yellow and blue.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It turns out that RYB as a subtractive system is centuries old ideology but one that is sadly still being taught. In subtractive systems if you have a blue primary its absorption is too broad. Similarly for red. If you start with RYB you can make all the hues but not all the colours. Many of the mixtures are dull and desaturated.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  What is in fact a color model?
&lt;/h1&gt;

&lt;p&gt;A color model is an orderly system for creating a whole range of colors from a small set of primary colors. There are two types of color models, those that are subtractive and those that are additive. Additive color models use light to display color while subtractive models use printing inks. Colors perceived in additive models are the result of transmitted light. Colors perceived in subtractive models are the result of reflected light.&lt;br&gt;
There are several established color models used in computer graphics, but the two most common are the RGB model (Red-Green-Blue) for computer display and the CMYK model (Cyan-Magenta-Yellow-black) for printing.&lt;/p&gt;

&lt;h1&gt;
  
  
  RGB History Reference :
&lt;/h1&gt;

&lt;p&gt;RGB was invented from Thomas Young  and Hermann von Helmholtz around 1800 both was scientist's Thomas and elaborated from as Scottish Mathematician James Clerk Maxwell around 1860.&lt;/p&gt;

&lt;h1&gt;
  
  
  RGB what you need to remember:
&lt;/h1&gt;

&lt;p&gt;*The RGB model forms its gamut from the primary additive colors of red, green and blue. When red, green and blue light is combined it forms white. Computers generally display RGB using 24-bit color. In the 24-bit RGB color model there are 256 variations for each of the additive colors of red, green and blue. Therefore there are 16,777,216 possible colors (256 reds x 256 greens x 256 blues) in the 24-bit RGB color model.&lt;/p&gt;

&lt;p&gt;*In the RGB color model, colors are represented by varying intensities of red, green and blue light. The intensity of each of the red, green and blue components are represented on a scale from 0 to 255 with 0 being the least intensity (no light emitted) to 255 (maximum intensity). For example in the above RGB chart the magenta color would be R=255 G=0 B=255. Black would be R=0 G=0 B=0 (a total absence of light).&lt;/p&gt;

&lt;h1&gt;
  
  
  CMY(K) Model History Reference :
&lt;/h1&gt;

&lt;p&gt;In 1906, the Eagle Printing Ink Company incorporated the four-color wet process inks for the first time. These four colors were cyan, magenta, yellow, and black (also known as key), hence the name CMYK. It was discovered that these four colors can be combined to produce an almost unlimited number of richer, darker tones.&lt;br&gt;
CMYK printing uses a method called half-toning to create different intensities of color while saving on ink. The technique has been used by printing presses since the 1850s, and was adapted for the CMYK model to expand the colors that could be made.&lt;br&gt;
In 1956, Pantone Inc. consulted a chemist to reduce the complexity of their printing process. The ink supply was reduced to a simpler system, using a smaller number of inks to produce a boundless range of colors. Their greatest contribution to the industry was to introduce the Pantone Color Matching System.&lt;/p&gt;

&lt;p&gt;Ink manufacturers around the world consider the Pantone color as standard. Even though most Pantone colors cannot be achieved from mixing the CMYK colors alone, the company recognizes its significance in the industry and indicate which ones can be reproduced on the CMYK model. Interestingly, Pantone uses 14 pigments to create 1,114 unique colors.&lt;/p&gt;

&lt;h1&gt;
  
  
  CMY(K) things to remember :
&lt;/h1&gt;

&lt;p&gt;*According to the theory, 100% cyan, 100% magenta and 100% yellow would result in a pure black. With today's printing colors it is not possible to realize this, so in the area of printing the additional component key (K, black) is necessary.&lt;/p&gt;

&lt;p&gt;*Therefore, the difference between the CMY- and the CMYK color model is, that the CMY color model assumes that it is possible to mix black by all of the three pure colors and the CMYK color model uses black as an additional color.&lt;/p&gt;

&lt;p&gt;*In the CMY color model, black is 100% cyan, 100% magenta and 100% yellow and in the CMYK color model, black is 0% cyan, 0% magenta, 0% yellow and 100% key (black). With the exception of pure colors, the CMYK color model also uses black for many other colors.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>design</category>
      <category>ux</category>
      <category>theory</category>
    </item>
    <item>
      <title>Js Node (NodeMailer)</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Wed, 16 Jun 2021 06:49:52 +0000</pubDate>
      <link>https://dev.to/feco2019/js-node-nodemailer-31ic</link>
      <guid>https://dev.to/feco2019/js-node-nodemailer-31ic</guid>
      <description>&lt;p&gt;Hello there guys,i hope my post finds you well and with appetite for programming during the week.&lt;/p&gt;

&lt;p&gt;Today my subject is &lt;strong&gt;NodeMailer&lt;/strong&gt; a module which stands for transporting email in javascript logic.&lt;/p&gt;

&lt;p&gt;It is a node  module so you can easily install it with yarn or &lt;br&gt;
npm,i will go ahead with npm.&lt;/p&gt;

&lt;p&gt;So, first things first just simple open up your CLI and  type&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install nodemailer&lt;/code&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Requirements
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Node.js v6.0.0 or newer.&lt;/strong&gt; That’s it.&lt;/p&gt;

&lt;p&gt;Nodemailer is a module for Node.js applications to allow easy as cake email sending. The project got started back in 2010 when there was no sane option to send email messages, today it is the solution most Node.js users turn to by default.&lt;/p&gt;

&lt;h1&gt;
  
  
  Usage
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Setting Up
&lt;/h2&gt;

&lt;p&gt;To send an email you need a transport object which will include some additions about the email,the recipient,the adress and some other stuff like that.&lt;/p&gt;

&lt;p&gt;So we are creating our object &lt;/p&gt;

&lt;p&gt;&lt;code&gt;let trasnporter = nodemailer.createTransport(transport[, defaults])&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;Above we see a variable which stores the &lt;code&gt;nodemailer&lt;/code&gt; object,which is responsible to send the email as&lt;br&gt;
long as it uses the &lt;code&gt;createTransport&lt;/code&gt; method to define our email parameters &lt;code&gt;transport[,defaults]&lt;/code&gt; i will explain you real quick &lt;br&gt;
those two params.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Transport is the transport configuration object, connection url or a transport plugin instance.&lt;/li&gt;
&lt;li&gt;Defaults is an object that defines default values for mail options.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Send Email
&lt;/h2&gt;

&lt;p&gt;Once you have a transporter object you can send mail with it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;transporter.sendMail(data[, callback])&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Where : &lt;/p&gt;

&lt;p&gt;data defines the mail content (see Message Configuration for possible options).&lt;/p&gt;

&lt;p&gt;Callback is an optional callback function to run once the message is delivered or it failed.&lt;/p&gt;

&lt;p&gt;Also it has more stuff you can receive and work with check here&lt;br&gt;
&lt;a href="https://nodemailer.com/usage/"&gt;NodeMailer Usage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If callback argument is not set then the method returns a Promise object. Nodemailer itself does not use Promises internally but it wraps the return into a Promise for convenience.&lt;/p&gt;

&lt;h2&gt;
  
  
  Message Configuration
&lt;/h2&gt;

&lt;p&gt;Your message and his body should look like my example bellow :&lt;/p&gt;

&lt;p&gt;&lt;code&gt;var message = {&lt;br&gt;
  from: "test_sender@server.com",&lt;br&gt;
  to: "test_seceiver@sender.com",&lt;br&gt;
  subject: "NodeMailer",&lt;br&gt;
  text: "Hello this is plain text example",&lt;br&gt;
  html: "&amp;lt;p&amp;gt;This is html plain text example&amp;lt;/p&amp;gt;"&lt;br&gt;
};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;As we can see above we created message variable which is initiated as object with the rest key-pair values.Those are the most common fields&lt;/p&gt;

&lt;p&gt;1.from - The email address of the sender. All email addresses can be plain ‘&lt;a href="mailto:sender@server.com"&gt;sender@server.com&lt;/a&gt;’ or formatted '“Sender Name” &lt;br&gt;
&lt;a href="mailto:sender@server.com"&gt;sender@server.com&lt;/a&gt;', see Address object for details.&lt;/p&gt;

&lt;p&gt;2.to - Comma separated list or an array of recipients email addresses that will appear on the To: field&lt;/p&gt;

&lt;p&gt;3.cc - Comma separated list or an array of recipients email addresses that will appear on the Cc: field&lt;/p&gt;

&lt;p&gt;4.bcc - Comma separated list or an array of recipients email addresses that will appear on the Bcc: field&lt;/p&gt;

&lt;p&gt;5.subject - The subject of the email&lt;/p&gt;

&lt;p&gt;6.text - The plaintext version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘/var/data/…'})&lt;/p&gt;

&lt;p&gt;7.html - The HTML version of the message as an Unicode string, Buffer, Stream or an attachment-like object ({path: ‘http://…'})&lt;/p&gt;

&lt;p&gt;8.attachments - An array of attachment objects (see Using attachments for details). Attachments can be used for embedding images as well.&lt;/p&gt;

&lt;p&gt;A large majority of emails sent look a lot like this, using only a few basic fields,you can check here for more advanched fields:&lt;br&gt;
&lt;a href="https://nodemailer.com/message/"&gt;Mail Fields&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Is coming also with an Ap NodemailerApp is the ultimate cross platform email debugging app.&lt;/p&gt;

&lt;p&gt;App includes local SMTP and POP3 servers, a sendmail replacement, catchall email domain service, AMP4Email renderer and it imports emails from EML files, EMLX files, large MBOX files from Gmail takeout, Maildir folders and Postfix queue files for inspection and preview. Ever wanted to view the actual HTML source of a nicely designed email instead of some garbled rfc822 text? Just open the HTML tab of an email to see it. &lt;br&gt;
Check Here...&lt;a href="https://nodemailer.com/app/"&gt;Nodemailer App&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all we have for today for more information check the documentation on github link.&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>node</category>
      <category>mailer</category>
      <category>smtp</category>
    </item>
    <item>
      <title>Js Node (Helmet.js)</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Sun, 23 May 2021 14:50:23 +0000</pubDate>
      <link>https://dev.to/feco2019/node-js-helmet-js-4n9</link>
      <guid>https://dev.to/feco2019/node-js-helmet-js-4n9</guid>
      <description>&lt;p&gt;Hello there guys!&lt;/p&gt;

&lt;p&gt;As the days going through and summer is near a lot of you, have done with projects,couple of 'em created in node/express.js environment and probably you think  this is&lt;br&gt;
the time to force some extra functionalities ,with some external&lt;br&gt;
libraries-packages. :D :D&lt;/p&gt;

&lt;p&gt;Today, i will focus in one dependency, is called Helmet.js exist also an open repo&lt;br&gt;
on gitghub,check here &lt;a href="https://github.com/helmetjs/helmet"&gt;helmet-repo&lt;/a&gt; which helping us provide some&lt;br&gt;
additions in our express server,those parameters are focused on the security of your app.&lt;/p&gt;

&lt;p&gt;You can use npm or yarn i will head with npm so simple we can install it &lt;code&gt;npm install helmet --save&lt;/code&gt; and save it globally.&lt;/p&gt;

&lt;p&gt;So if you already have an express server running,you can just&lt;br&gt;
simple require the helmet, see bellow :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require("express");
const helmet = require("helmet");

const app = express();

app.use(helmet());

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

&lt;/div&gt;



&lt;h1&gt;
  
  
  What is helmet?
&lt;/h1&gt;

&lt;p&gt;Helmet is a function used as  middleware and is wrapping 11 smaller middleware's,sets HTTP Headers,origin validations and some other stuff to avoid multiple attacks on your website-webapp.&lt;/p&gt;

&lt;p&gt;So the above &lt;code&gt;app.use(helmet());&lt;/code&gt;  is equivalent to this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.use(helmet.contentSecurityPolicy());
app.use(helmet.dnsPrefetchControl());
app.use(helmet.expectCt());
app.use(helmet.frameguard());
app.use(helmet.hidePoweredBy());
app.use(helmet.hsts());
app.use(helmet.ieNoOpen());
app.use(helmet.noSniff());
app.use(helmet.permittedCrossDomainPolicies());
app.use(helmet.referrerPolicy());
app.use(helmet.xssFilter());
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All setting headers to your content, to your loading balances and predifined actions to verify the actions of the clients verifying like this who is who,is a sugar to your application not the core of your security build.&lt;/p&gt;

&lt;p&gt;Let's see two examples&lt;br&gt;
1.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  helmet({
    referrerPolicy: { policy: "no-referrer" },
  })
);
//Set custom options for referrer policy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Sets "X-XSS-Protection: 0"
// Disables browsers buggy cross-site scripting filter by setting //the X-XSS-Protection header to 0


app.use(helmet.xssFilter());



&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;// Sets "X-Content-Type-Options: nosniff"
//Sets the X-Content-Type-Options header to nosniff. This mitigates //MIME type sniffing which can cause security vulnerabilities
app.use(helmet.noSniff());



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

&lt;/div&gt;



&lt;p&gt;That's all we have for today for more information check the documentation on github link.&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>javascript</category>
      <category>helmet</category>
      <category>depedencies</category>
    </item>
    <item>
      <title>Does your work get paid properly?</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Tue, 13 Apr 2021 13:13:13 +0000</pubDate>
      <link>https://dev.to/feco2019/does-your-work-get-paid-properly-91j</link>
      <guid>https://dev.to/feco2019/does-your-work-get-paid-properly-91j</guid>
      <description>&lt;p&gt;Hello there community and learners.&lt;/p&gt;

&lt;p&gt;Two weeks before i came across of a WordPress project,in fat terms it was an eshop(Woocomerce) with some UI work on a custom template,and the back-end work for (bookings,invoices etc).&lt;/p&gt;

&lt;p&gt;I used to do a better offers when the client is suggested from a friend or an external partner so i decided to ask the 50% of the ammount.To talk with a numbers that was 500euro from 1000euro which was my offer for the eshop.&lt;/p&gt;

&lt;p&gt;The customer thought that 500 euro was much enough and decided to to tell me that we will not proceed further with the construction,even if i was already started to create things and show him what i was doing.I get upset a while but you know in freelancing things like these are common.Yesterday i recieved an email from him that my job was very low bugdet and after me he made his research and he got totally dissapointed from the prices and the services that they provided to him.&lt;br&gt;
He asked me if i can be in partnership with him again.&lt;/p&gt;

&lt;p&gt;My quetsion is?&lt;/p&gt;

&lt;p&gt;Do we underestimate our job,or some clients that belongs out of the field of IT just they are not ready yet to understand the path of our job?&lt;br&gt;
What should be my answer?Should i be professional and say yes let's do it or should i keep it personal and say yes let's do it with more money or even no i don't do it?&lt;br&gt;
With wich way you are calculating your cost's for each project? &lt;/p&gt;

&lt;p&gt;I hope you to have a nice day and a nice reason to talk about your experiences along that situations.&lt;/p&gt;

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

</description>
    </item>
    <item>
      <title>JS Set Object (2 handy usages)</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Fri, 19 Mar 2021 11:27:37 +0000</pubDate>
      <link>https://dev.to/feco2019/js-using-set-3-handy-usages-2bgl</link>
      <guid>https://dev.to/feco2019/js-using-set-3-handy-usages-2bgl</guid>
      <description>&lt;h1&gt;
  
  
  Hello there guys.
&lt;/h1&gt;

&lt;p&gt;Today i will talk for the &lt;strong&gt;SET&lt;/strong&gt; object which is storing new&lt;br&gt;
unique values of any type as well primitive values and object references.&lt;br&gt;
This could be handy for some cases,i will show you two of them&lt;br&gt;
in this thread.&lt;/p&gt;
&lt;h2&gt;
  
  
  Cases
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Remove duplicated records from the arrays &lt;/li&gt;
&lt;li&gt;Using &lt;strong&gt;add()&lt;/strong&gt; method to add values to the SET object&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So first lets create our array and try our first case,in my example we will set some values twice,with this way we will see &lt;br&gt;
how &lt;strong&gt;Set()&lt;/strong&gt; will help us to point and delete the overwrites.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let myArray = ['Jim','Jhon','Grace','Felice','Jhon','Sylia','Grace'] ;

let myArrayClear = [...new Set(myArray)]
console.log(myArrayClear)

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

&lt;/div&gt;



&lt;p&gt;The result without double records.&lt;br&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%2Fuploads%2Farticles%2Fyjycjfhic7l1uff6wqnc.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%2Fuploads%2Farticles%2Fyjycjfhic7l1uff6wqnc.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Check to see the results on your console it should miss the double records,job done!&lt;/p&gt;

&lt;p&gt;Secondary we will see how a new instance of &lt;strong&gt;Set&lt;/strong&gt; object could work very nicely with &lt;strong&gt;add()&lt;/strong&gt; method and create values as long as avoiding the double records, let's take a look.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const mySetObject = new Set()

mySetObject.add(2)
mySetObject.add('Hello Word')
mySetObject.add(4)
mySetObject.add({a: 1, b: 2})
mySetObject.add(2)


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

&lt;/div&gt;



&lt;p&gt;After our additions (number,string,object) we can itterate through our array that contains different values and data types but you will notice that we add the number &lt;strong&gt;2&lt;/strong&gt; twice,whe we will loop though and you will see that is beeing added only once because of the rule &lt;strong&gt;"A value in the Set may only occur once"&lt;/strong&gt;.So let's use &lt;strong&gt;for&lt;/strong&gt; to see what we get.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const mySetObject = new Set()

mySetObject.add(2)
mySetObject.add('Hello Word')
mySetObject.add(4)
mySetObject.add({a: 1, b: 2})
mySetObject.add(2)

for (let item of mySetObject) console.log(item)

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

&lt;/div&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%2Fuploads%2Farticles%2Fhocyaelejrb3t483u1qh.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%2Fuploads%2Farticles%2Fhocyaelejrb3t483u1qh.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's all for today!&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019" rel="noopener noreferrer"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>functional</category>
      <category>javascript</category>
      <category>fundementals</category>
      <category>algorithms</category>
    </item>
    <item>
      <title>JS Console  Tricks(How to use Css in the console)</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Wed, 24 Feb 2021 14:09:57 +0000</pubDate>
      <link>https://dev.to/feco2019/js-console-tricks-how-to-use-css-in-the-console-84m</link>
      <guid>https://dev.to/feco2019/js-console-tricks-how-to-use-css-in-the-console-84m</guid>
      <description>&lt;p&gt;Hello there guys.&lt;/p&gt;

&lt;p&gt;Today we will provide a nice trick,about how you can style your console messages with css.&lt;br&gt;
It's common nowdays developers using the browser console for their&lt;br&gt;
tests.&lt;/p&gt;

&lt;p&gt;What about if you can preview your result with more semantic way?&lt;br&gt;
Let's dive to the point&lt;/p&gt;

&lt;p&gt;I will use Chrome Developer Tools for this project you  can seek with me or you can use the browser of your choice.&lt;/p&gt;

&lt;p&gt;First we  open the developer tools,you can pres F12 for the shortcut.&lt;/p&gt;

&lt;p&gt;You should see something like this :&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--744Surnm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xxzhzg7ohl9hy74kxxah.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--744Surnm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xxzhzg7ohl9hy74kxxah.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After that you going to the head menu and you hit the console tab.&lt;br&gt;
 &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OXACExLs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mn9wg4u7ywalltdzi5hc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OXACExLs--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mn9wg4u7ywalltdzi5hc.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have bunch of errors or warnings you can press &lt;strong&gt;CTRL + L&lt;/strong&gt;&lt;br&gt;
to clear the console.&lt;/p&gt;

&lt;p&gt;So,for our example we will console just the Hello World with styling and without.&lt;/p&gt;

&lt;p&gt;The normal &lt;code&gt;console.log&lt;/code&gt; should be  something like  this and we print just a &lt;strong&gt;'Hello there dev Community'&lt;/strong&gt;&lt;/p&gt;

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

&lt;p&gt;If we would like to add some styling we should use the percentage sign and the letter &lt;strong&gt;c&lt;/strong&gt; in the beggining of the text and as second parameter with comma you import your css style and the example shoul look something like this&lt;/p&gt;

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

&lt;p&gt;And our result  seems different,ouacha!&lt;/p&gt;

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

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>console</category>
      <category>css</category>
      <category>javascript</category>
      <category>style</category>
    </item>
    <item>
      <title>JS Node (express-rate-limiter)</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Thu, 11 Feb 2021 16:34:40 +0000</pubDate>
      <link>https://dev.to/feco2019/js-node-express-express-rate-limiter-3cmp</link>
      <guid>https://dev.to/feco2019/js-node-express-express-rate-limiter-3cmp</guid>
      <description>&lt;p&gt;Hello there guys today i will talk about  express(framework) and more specific for one of its package which is called rate-limiter.&lt;br&gt;
It is a module that can handle malicious or incificient requests from outcoming/incoming traffic.&lt;/p&gt;
&lt;h1&gt;
  
  
  What we need for  this project?
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Node Js &lt;/li&gt;
&lt;li&gt;Express Js&lt;/li&gt;
&lt;li&gt;Express rate-limiter depedency&lt;/li&gt;
&lt;li&gt;Code  Editor(I am  using Vs-Code)&lt;/li&gt;
&lt;li&gt;NPM&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So let's see in action  what excactly  rate-limiter does.&lt;/p&gt;

&lt;p&gt;First we need to create our root folder and then let's &lt;br&gt;
create an express  server in Node to see how we can deploy that &lt;br&gt;
and what are they options we have.&lt;/p&gt;

&lt;p&gt;I  am using gitBASH for my basic  foldering/sourcing cli activity,you can use one of your choice the commands are simular  you can do it manually as well in windows enviroment.&lt;/p&gt;

&lt;p&gt;So first i am  creating my project folder called NodeLimiter&lt;/p&gt;

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

&lt;p&gt;I will use only one js  file which we will call  it app.js &lt;br&gt;
So i move toward to the folder path&lt;/p&gt;

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

&lt;p&gt;And inside of the root file we create the app.js&lt;/p&gt;

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

&lt;p&gt;and finally we open the editor(VS)&lt;/p&gt;

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

&lt;p&gt;So we are here and now  it is the time to install our depedencies as  well  to initialize npm&lt;/p&gt;

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

&lt;p&gt;So next we open our terminal again and we type &lt;/p&gt;

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

&lt;p&gt;We press enter several  times and if we go  back at vs code we have created package.json file &lt;/p&gt;

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

&lt;p&gt;After that we type again to the console.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M9oER-SN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vrsb7nqc4cqi7n10wsoi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M9oER-SN--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/vrsb7nqc4cqi7n10wsoi.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We press again enterand we have our package-lock.json file&lt;/p&gt;

&lt;p&gt;Now let's install express and  express rate limiter again in the console we can type the name of the packages that we need with space between them&lt;/p&gt;

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

&lt;p&gt;Nice we are ready to go!&lt;/p&gt;

&lt;p&gt;First we need to create  our server and give some basic configuration so follow me.&lt;/p&gt;

&lt;p&gt;As we finish with theserver, we initiate express and parse it to variable called app , then we define the port that we like to run our server and should look something like this &lt;/p&gt;

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

&lt;p&gt;After our server creation we include the limiter package in that kind  of way.&lt;/p&gt;

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

&lt;p&gt;Lets create now three routes and lets use our package to set some restrictions to them,how much request accept  and &lt;/p&gt;

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

&lt;p&gt;One root diretory, one about and one about with different request method.&lt;br&gt;
All of them respond with the ok message except home which returns hello world.&lt;br&gt;
Simple?&lt;/p&gt;

&lt;p&gt;Now let's create our midlleware that will limitate the requests,as you can see in the picture above i have 2 GET requests and one POST so we will approach two different actions.&lt;/p&gt;

&lt;p&gt;Let's create our variable called reqLimiter and we will call  the rateLimit method of express packaged that has the following.&lt;/p&gt;

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

&lt;p&gt;And use it like this.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--JfU6j1AY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xrn3nwsmq2esdcsjw7qs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--JfU6j1AY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xrn3nwsmq2esdcsjw7qs.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  NOTE
&lt;/h1&gt;

&lt;p&gt;What parameters this method takes as object?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;windowMs&lt;/strong&gt; – This is the window size (24 hours in our case) in milliseconds&lt;br&gt;
&lt;strong&gt;max&lt;/strong&gt; – This represents the number of allowed requests per window per user&lt;br&gt;
&lt;strong&gt;message&lt;/strong&gt; – This specifies the response message users get when they have exceed the allowed limit&lt;br&gt;
&lt;strong&gt;headers&lt;/strong&gt; – This specifies whether the appropriate headers should be added to the response showing the enforced limit (X-RateLimit-Limit), current usage (X-RateLimit-Remaining), and time to wait before retrying (Retry-After) when the limit is reached&lt;/p&gt;

&lt;p&gt;Better description about those properties you can find here&lt;br&gt;
&lt;a href="https://blog.logrocket.com/rate-limiting-node-js/"&gt;MoreDetails..&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Start your server,type on your terminal :&lt;/p&gt;

&lt;p&gt;&lt;br&gt;
`&lt;code&gt;node app.js&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;Exist more properties that you set in the object but those are basic for our example the windowsMs defined for 7 mins, max number of requests are 5,headers are true and the message that returns after five request is parametric for the example.&lt;/p&gt;

&lt;p&gt;So now if you open your browser at the local host&lt;br&gt;
&lt;a href="https://dev.tolocalhost:4000"&gt;LocalHost&lt;/a&gt; &lt;br&gt;
You will be able to see the home route and the Hello Word!&lt;/p&gt;

&lt;p&gt;Try to refresh 5 times to see what you get.&lt;br&gt;
You can also use POSTMAN for more advanched tests and different Request Methods.&lt;br&gt;
Play with endpoints,reach more values for the limiter by different resource and that's it guys you created your first node express layer for bad requesting.&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>express</category>
      <category>javascript</category>
      <category>backend</category>
    </item>
    <item>
      <title>0auth v.2(Token) #QuickReview</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Fri, 05 Feb 2021 14:32:16 +0000</pubDate>
      <link>https://dev.to/feco2019/0auth-v-2-token-bip</link>
      <guid>https://dev.to/feco2019/0auth-v-2-token-bip</guid>
      <description>&lt;p&gt;Good Morning guys. I was trying to find a good,quick and understandable example,to analyse the 0auth model(token).&lt;/p&gt;

&lt;p&gt;After a lot of frustrated documentation,i get inspired from a youtube video that's not saying more than you need to understand for the workflow.&lt;/p&gt;

&lt;p&gt;Let's start 0auth token is a way to authorize user's access resources which are protected from the resource owner.&lt;br&gt;
They are suggested because they are more confidential than the classic model that we use all this years with the simple authentication wich was authorizing the front-user to access the end-user stuff(database,resources,priviligies,etc)&lt;/p&gt;

&lt;p&gt;Lets see an image how that works and after that i will describe you a small example to capture it better in your mindset&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ISHRZxUY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v1ra4a3onmmja01xi7ue.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ISHRZxUY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/v1ra4a3onmmja01xi7ue.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the basic flow let's understand it a bit.&lt;/p&gt;

&lt;p&gt;As a client i am trying to prove who am i to the owner's resources,&lt;br&gt;
if am the right person the server gives me permission and then with that kind of permission(Authorazation Grant) i am sending back to the server a request to create me a token,&lt;br&gt;&lt;br&gt;
the server sends me the token and with that token i am requesting again to access the protected routes/resources &lt;br&gt;
understood?&lt;/p&gt;

&lt;p&gt;Lets see now the example that inspired me for this section&lt;/p&gt;

&lt;p&gt;I am going vacation somewhere and i rent a hotel.&lt;br&gt;
To recieve a key from the receptionist, i showed  to him my ID credentials,as also gave my credit card.&lt;br&gt;
The receptionist gave me back a keycard.Then i took this card and i went  toward to my room,i swipped my card and of course i get in my room.&lt;br&gt;
So the keycard is the like an 0auth token, an access token just says wether or not, the bearer of the token is allowed to access the thing they are trying to access,in this case the hotel room.&lt;br&gt;
The door doesn't care who i am. &lt;br&gt;
It doesn't need to know my name or any unique identifier it just needs to know whether or not this card is allowed to acces this door at this time.So to recap the card doesn't care about me but when it needs to give me access to the (resource/"room") 0auth is exactly the same thing.&lt;/p&gt;

&lt;p&gt;Take a look of OktaDev video : &lt;br&gt;
&lt;a href="https://www.youtube.com/watch?v=BNEoKexlmA4"&gt;0authExample&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>0auth</category>
      <category>token</category>
      <category>authorazation</category>
      <category>authentication</category>
    </item>
    <item>
      <title>JS  Hoisting</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Sat, 30 Jan 2021 11:36:12 +0000</pubDate>
      <link>https://dev.to/feco2019/wth-is-hoisting-458o</link>
      <guid>https://dev.to/feco2019/wth-is-hoisting-458o</guid>
      <description>&lt;p&gt;Hello there guys,&lt;/p&gt;

&lt;p&gt;I hope you everybody has a nice weekend,creative and passionate for some coding time.&lt;/p&gt;

&lt;p&gt;What the hack is hoisting?&lt;br&gt;
It is a term that i used to found commonly when i started learning JS and it is confuse sometimes, but trust me its a just a luxurines of JS that can be explained real quick.&lt;/p&gt;

&lt;p&gt;In simple worlds hoisting, points to  variable's declaration and initiation.&lt;br&gt;
You can use a variable before you will declare it.&lt;br&gt;
Let's say that you have this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;\\assign value to variable before declaration

name = 'Dimitris';

const showName = () =&amp;gt; {
 console.log(name);
}

\\Declare variable after the value's assignment
let name ;

showName();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To understand the above example,you should have the thought in your mind that hoisting means every declaration is going to the top of the programm even if it is physically sits somewhere else.&lt;/p&gt;

&lt;p&gt;So above we have a value that is assigned before the variable declaration.Is working fine, Yes you did it you used hoisting.&lt;br&gt;
Congratulations.!&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>hoisting</category>
      <category>javascript</category>
      <category>fundementals</category>
    </item>
    <item>
      <title>JS IIFEs </title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Tue, 22 Dec 2020 14:39:28 +0000</pubDate>
      <link>https://dev.to/feco2019/iifie-js-16om</link>
      <guid>https://dev.to/feco2019/iifie-js-16om</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hello there guys!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Today we will speak about IIFEs and why sometimes could be handy for your projects.&lt;/p&gt;

&lt;p&gt;IIFEs in javascript stands for immediately invoked function expressions,in simple terms just a function that runs directly after of its statement.&lt;/p&gt;

&lt;p&gt;Commonly we declare a function on the stack flow and when we need it we call it lets see a quick example.&lt;/p&gt;

&lt;p&gt;Let's imagine that we have a function that we would like to show  us a console message,simple enough?&lt;/p&gt;

&lt;p&gt;It could be something like this&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function showMessage() {
console.log('Hello Dev Community)
};


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

&lt;/div&gt;



&lt;p&gt;Right?&lt;br&gt;
Right,now if we need to use this function we just say&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;showMessage();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;with ease we solved our problem.&lt;br&gt;
But what happening if we want to initiate that function instantly.&lt;/p&gt;

&lt;p&gt;In this condition it is where IIFEs be useful, lets see this kind of syntax for the exact example above.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(function () {
console.log('Hello Dev Community')
}) ();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see,we wrap our function declaration inside parentheses and after the addition of functionality (console.log) , we close them and the curly braces as well, we add one more pair of parentheses out of the function scope that does our job, to invoke this function immediately.&lt;/p&gt;

&lt;p&gt;Of course we can set parameters,so we can say&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(function (text) {
console.log('Hello'  + text)
}) (' Dev Community');

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

&lt;/div&gt;



&lt;p&gt;So that's it guys lets roll,lets code..!&lt;br&gt;
I hope you got an idea for a better usage of IIFEs.&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>iifie</category>
      <category>javascript</category>
      <category>functional</category>
      <category>workflow</category>
    </item>
    <item>
      <title>JS 'this' keyword</title>
      <dc:creator>Dimitris Chitas</dc:creator>
      <pubDate>Wed, 16 Dec 2020 10:34:00 +0000</pubDate>
      <link>https://dev.to/feco2019/this-keyword-114m</link>
      <guid>https://dev.to/feco2019/this-keyword-114m</guid>
      <description>&lt;p&gt;Hello there folks and learners.&lt;/p&gt;

&lt;p&gt;As you can see nowadays the world of web development and their community, expand rapidly. This phenomenon brings us closer,with &lt;br&gt;
web technologies/programming languages that help us develop&lt;br&gt;
real time web/native applications to make our lives simplier&lt;/p&gt;

&lt;p&gt;Touroum - Touroum and i am ready to present  you the world of JAVASCRIPT.&lt;br&gt;
Okay, to be honest i will speak for something specific of it, that might&lt;br&gt;
confuse the kick starters as well  the intermediate developers even the oldest.The  'this' keyword.&lt;br&gt;
If you already came across in  conditions, that 'this' keyword may exist or you are maintenance someone's else code this post is for you.&lt;/p&gt;

&lt;p&gt;So back to grill,let's roast our knowledge.!&lt;/p&gt;

&lt;p&gt;JavaScript engine works in and out of the browser.&lt;br&gt;
Let's stand in the browser for the beginning and have a better estimate about how this procedure works.&lt;/p&gt;

&lt;p&gt;Before we will say where 'this' keyword refers to.&lt;br&gt;
Lets see the procedure.&lt;br&gt;
When we open a tab in a browser no matter which one,javascript engine create's excecution context.&lt;br&gt;
Imagine it is like a wrapper that contains all the main states/functionalities that browser needs to run properly and give us back the data we would like to see with the human eye.&lt;/p&gt;

&lt;p&gt;Excecution context its exactly what is sounds. It is a field like this one which i am writing the article and contains couple valuable things.Lets focus to the most important's of them.&lt;/p&gt;

&lt;p&gt;So lets say we have a big box(Excecution Context) and inside of it&lt;br&gt;
we have smaller boxes. &lt;br&gt;
By name we can call them &lt;br&gt;
1)Global Object &lt;/p&gt;

&lt;p&gt;2)this;(Global.variable) &lt;/p&gt;

&lt;p&gt;3)Outer Environment &lt;/p&gt;

&lt;p&gt;4)And finally your code.&lt;/p&gt;

&lt;p&gt;As you already know or if you don't, JavaScript is object oriented language and everything is created as an object (key/name-value) pairs&lt;/p&gt;

&lt;p&gt;So if we say,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const Person = { name: 'Dimitris } ;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We have an object called Person with the&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;key = name 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;value = Dimitris
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;, simple?&lt;/p&gt;

&lt;p&gt;Yes all the JavaScript is based on this model above.&lt;/p&gt;

&lt;p&gt;So the execution's context while is rendering(open new tab) for instance is creating the most important object the Global Object by the side of the browser this is the window object. If you run JavaScript out of browser as like Node.js(Runtime Env.) the Global object is another one but is still the first in the tree hierarchy.&lt;/p&gt;

&lt;p&gt;If you open your dev tools in the browser and go to the console and just type window you will see a bunch of information all the object modules and methods that window object contains.&lt;/p&gt;

&lt;p&gt;The call stack  of JavaScript it has two ways of instances, the private(this is whatever is within a function such as variables the function scope if you prefer and the global scope.&lt;br&gt;
To make it more clear see this two example below to take an idea. Let's say!&lt;br&gt;
--Function(Function Scope)--&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Person(person) {
let person = this.person;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;--Variable(Global Scope)--&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let example = this;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Lets describe what we saw above. When we are using the 'this' keyword &lt;br&gt;
inside in a function scope this refers to the owner of the function in our case is the Person it is exactly the same in methods and in more multi complex statements. Just keep in mind when you see 'this' inside in a function is pointing to the owner.&lt;br&gt;
Above we created a variable with the name of example and we passed the keyword 'this' as a value. &lt;br&gt;
So if you try in your console and type&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window == example;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or even without the wrapped variable you can try both&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;window == this;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you will see that is true.&lt;br&gt;
The Boolean comparison returns true value, because when we are use 'this' outside of the function scope we refer to the global object and in our case is the window object as we are talking about the browsers.&lt;/p&gt;

&lt;p&gt;So keep in mind&lt;br&gt;
-This keyword inside of a private scope(Functions/Methods/etc.) is &lt;br&gt;
referring to the owner of it.&lt;br&gt;
-This keyword outside of a private scope(Global Scope) is referring &lt;br&gt;
to the global object(for browsers window object)&lt;/p&gt;

&lt;p&gt;Try your Self&lt;br&gt;
Press f12 -&amp;gt; console -&amp;gt; and type -&amp;gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;this==window;

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

&lt;/div&gt;



&lt;p&gt;See the result!&lt;br&gt;
Clear the console and try the next this.person==window &lt;br&gt;
See the result!&lt;/p&gt;

&lt;p&gt;Have a nice workday guys, in case for further explanation do not hesitate to contact me or find me in github or linkedin.&lt;br&gt;
GitHub : &lt;a href="https://github.com/feco2019"&gt;https://github.com/feco2019&lt;/a&gt;&lt;br&gt;
Linkedin : &lt;a href="https://www.linkedin.com/in/dimitris-chitas-930285191/"&gt;https://www.linkedin.com/in/dimitris-chitas-930285191/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>this</category>
      <category>tutorial</category>
      <category>keyword</category>
    </item>
  </channel>
</rss>
