<?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: Legobox</title>
    <description>The latest articles on DEV Community by Legobox (@legobox).</description>
    <link>https://dev.to/legobox</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%2Forganization%2Fprofile_image%2F225%2F82a803f4-5759-4cc7-892a-2cf5e74dada8.png</url>
      <title>DEV Community: Legobox</title>
      <link>https://dev.to/legobox</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/legobox"/>
    <language>en</language>
    <item>
      <title>Introduction to ML: How to frame data.</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Sun, 26 Jan 2020 14:29:01 +0000</pubDate>
      <link>https://dev.to/legobox/introduction-to-ml-how-to-frame-data-dn2</link>
      <guid>https://dev.to/legobox/introduction-to-ml-how-to-frame-data-dn2</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This piece was originally posted on my blog at &lt;a href="https://mozartted.legobox.io"&gt;legobox&lt;/a&gt;, if you want to follow the full series on Machine learning and my experiments with software development, check it out.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Introduction to ML: How to frame data
&lt;/h1&gt;

&lt;h1&gt;
  
  
  Origins.
&lt;/h1&gt;

&lt;p&gt;Data has always been a problem, understanding it, dealing with it, sourcing it. Yea it's always been a dread to work with data, therefore the process of presenting data in understandable form also known as framing is pretty important.&lt;/p&gt;

&lt;p&gt;Data as we know it can take all shapes and forms, from the text, images and audio files to CSV, SQL, and other data structures. Therefore in machine learning, collecting data, arranging data, and understanding it, is of utmost importance. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Framing is the process of arranging data in ways that can be easily understood by machine learning models.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In the piece we are going to explore more on framing and how it works, how we could use it and libraries in python which allow us to work with framing data easily.&lt;/p&gt;

&lt;h1&gt;
  
  
  What's framing.
&lt;/h1&gt;

&lt;p&gt;Framing is about arranging data in ways that can be easily understood by machine learning algorithms, pretty simple. With supervised machine learning, Framing is seriously important. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Supervised machine learning can be viewed as ML systems learning how to combine input to produce useful predictions on never-before-seen data. which almost defines all of machine learning.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With framing, here are the key concepts to learn.&lt;/p&gt;

&lt;h3&gt;
  
  
  The key concept's of Framing: Features and Labels
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Labels:&lt;/strong&gt; These are outputs we are trying to predict, i.e the &lt;code&gt;y&lt;/code&gt; in the &lt;code&gt;y = mx + c&lt;/code&gt; equation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt; : These are the inputs, &lt;code&gt;x&lt;/code&gt; , these can be anything ranging from words / text to numbers etc.&lt;/p&gt;

&lt;p&gt;Simply put Labels are the outputs, and features are the inputs, make no mistake though, Inputs and outputs, in this case, are not&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For an instance of data we can break the data sets into two categories for the process of training out models, These are particular instances of data relating feature to labels, these categories would include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Labeled examples&lt;/li&gt;
&lt;li&gt;Unlabelled examples.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The labeled examples are the ones in which we have features associated with their corresponding labels, while the unlabelled are those with no corresponding label.&lt;/p&gt;

&lt;p&gt;For example, here's a labeled example of California housing data.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M7Df9l66--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://mozartted.legobox.io/content/images/2020/01/Screenshot-2020-01-26-at-14.38.43.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7Df9l66--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://mozartted.legobox.io/content/images/2020/01/Screenshot-2020-01-26-at-14.38.43.png" alt="Introduction%20to%20ML%20How%20to%20frame%20data/Screenshot_2020-01-26_at_14.38.43.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The unlabelled examples contain features but no label, This is meant for testing after training in order to ascertain and predict the values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---YbRNA3y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://mozartted.legobox.io/content/images/2020/01/Screenshot-2020-01-26-at-14.38.53.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---YbRNA3y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://mozartted.legobox.io/content/images/2020/01/Screenshot-2020-01-26-at-14.38.53.png" alt="Introduction%20to%20ML%20How%20to%20frame%20data/Screenshot_2020-01-26_at_14.38.53.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In order to expand our understanding of Framing, we have to take a brief look at &lt;strong&gt;models&lt;/strong&gt; how they work and how it affects how we frame data.&lt;/p&gt;

&lt;h1&gt;
  
  
  What are Models.
&lt;/h1&gt;

&lt;p&gt;We all know what models are, the usual slim beautiful women, on runways and IG, but in the study of Machine learning and mathematics in general, Models are definitions of relationships between features and labels, i.e they are the relationship between a set of inputs and a set of outputs, therefore, they outline how a certain input produces a certain output.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Models are definitions of relationships between features and labels&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There are two major phases of a model's life.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Training&lt;/strong&gt; - The model looks at several examples, draws relationships between the features and the labels. To &lt;strong&gt;learn&lt;/strong&gt; how they work.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Inference.&lt;/strong&gt; - The model begins testing out predictions on new data to previously unseen before.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So how do we get started with defining features and labels from our data? To do this in python (&lt;strong&gt;which is a very common base for practicing Machine learning because of the abundance of tools and libraries&lt;/strong&gt;), we would use Pandas in reading and describing out data in tabular form. So let's have a brief look at this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting data: A super brief intro to pandas.
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Pandas is an open-source, BSD-licensed library providing high-performance, easy-to-use data structures and data analysis tools for the Python programming language.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here's a sample call to obtain data using pandas.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;
    &lt;span class="n"&gt;californiaHousingDf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"https://download.mlcc.google.com/mledu-datasets/california_housing_train.csv"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sep&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;","&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;californiaHousingDf&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;describe&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9mBBy0cy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://mozartted.legobox.io/content/images/2020/01/Screenshot_2020-01-01_at_19.30.54.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9mBBy0cy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/http://mozartted.legobox.io/content/images/2020/01/Screenshot_2020-01-01_at_19.30.54.png" alt="http://mozartted.legobox.io/content/images/2020/01/Screenshot_2020-01-01_at_19.30.54.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this case, we collected data of the California real estate from the hyperlink using the pandas &lt;code&gt;read_csv&lt;/code&gt; method, which would read the CSV data into a data-frame.&lt;/p&gt;

&lt;p&gt;In pandas there are two primary data structures, these are.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;DataFrame, Which is like a relational data table, with rows and columns.&lt;/li&gt;
&lt;li&gt;Series, which is a single column.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Dataframes contain one or more series and a name for each series.&lt;/p&gt;

&lt;p&gt;One way to create a &lt;code&gt;Series&lt;/code&gt; is to construct a &lt;code&gt;Series&lt;/code&gt; object. For example:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;DataFrame&lt;/code&gt; objects can be created by passing a &lt;code&gt;dict&lt;/code&gt; mapping &lt;code&gt;string&lt;/code&gt; column names to their respective &lt;code&gt;Series&lt;/code&gt;. If the &lt;code&gt;Series&lt;/code&gt; don't match in length, missing values are filled with special &lt;a href="http://pandas.pydata.org/pandas-docs/stable/missing_data.html"&gt;NA/NaN&lt;/a&gt; values. Example:&lt;/p&gt;

&lt;p&gt;But most of the time, you load an entire file into a &lt;code&gt;DataFrame&lt;/code&gt;. The following example loads a file with California housing data. Run the following cell to load the data and create feature definitions:&lt;/p&gt;

&lt;p&gt;Essentially data frames are two-dimensional descriptions of data. pretty lit stuff.&lt;/p&gt;

&lt;p&gt;To define our feature, To start, we're going to use just one numeric input feature, total_rooms. The following code pulls the total_rooms data from our &lt;code&gt;californiaHousingDf&lt;/code&gt; and defines the feature column using &lt;code&gt;numeric_column&lt;/code&gt;, which specifies its data is numeric:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;
    &lt;span class="c1"&gt;# Define the input feature: total_rooms.
&lt;/span&gt;    &lt;span class="n"&gt;my_feature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;californiaHousingDf&lt;/span&gt;&lt;span class="p"&gt;[[&lt;/span&gt;&lt;span class="s"&gt;"total_rooms"&lt;/span&gt;&lt;span class="p"&gt;]]&lt;/span&gt;

    &lt;span class="c1"&gt;# Configure a numeric feature column for total_rooms.
&lt;/span&gt;    &lt;span class="c1"&gt;# here tf is tensorflow.
&lt;/span&gt;    &lt;span class="n"&gt;feature_columns&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;tf&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;feature_column&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="n"&gt;numeric_column&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"total_rooms"&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In this case, &lt;code&gt;my_feature&lt;/code&gt; defines our features. To define our labels we could use, the &lt;code&gt;median_house_value&lt;/code&gt;, to define this as a label we simply reference them from the data frame&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight python"&gt;&lt;code&gt;
    &lt;span class="c1"&gt;# Define the label.
&lt;/span&gt;    &lt;span class="n"&gt;targets&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;californiaHousingDf&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s"&gt;"median_house_value"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Thus we now have our features and labels in two different variables, for our models to train on. &lt;/p&gt;

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

&lt;p&gt;In this piece we've learned about how we go about framing data and separating the input and output into variables we can use in our models, We also took a brief look at models and how we can work with them. In our next article we are going to look at the Linear regression model, probably the simplest model in machine learning and how it works, to get a better insight into how other models would work to achieve the same goal.&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>tutorial</category>
      <category>python</category>
      <category>programming</category>
    </item>
    <item>
      <title>Journey to fullstack developer - Authentication with Redux - promise based.</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Wed, 22 Aug 2018 04:53:06 +0000</pubDate>
      <link>https://dev.to/legobox/journey-to-fullstack-developer---authentication-with-redux---promised-based-g7p</link>
      <guid>https://dev.to/legobox/journey-to-fullstack-developer---authentication-with-redux---promised-based-g7p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article was originally posted on my blog at &lt;a href="https://medium.com/legobox/journey-to-fullstack-developer-authentication-with-redux-promised-based-cc17e7a08425"&gt;legobox&lt;/a&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  The weeks so far.
&lt;/h2&gt;

&lt;p&gt;In the bid, to be frank, I'm going to write with respect to my own laziness, yes I have been really lazy about this project. I have a problem of not usually completing passion projects but I'm trying to change that which is why I have to actually write about my laziness too. In the bid to get my full experience across. Sometimes I actually think I don't like coding so much if there's an easier way to solve a problem I'd probably take it. &lt;/p&gt;

&lt;p&gt;So far spectre has been undergoing slow progress, thanks to me (being sarcastic here), But I'm sure to improve that. This week completed all authentication related proceedings and I had the opportunity to really have a good look at authentication in react based projects and come up with some overview of the process, which I think I'd love to share.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building out Authentication - Redux based
&lt;/h2&gt;

&lt;p&gt;There have really been a lot of articles written about Authentication as with that came many idiosyncrasies with relation to the process, a lot of the time there were not enough explanations as to handle some scenarios and in other instances, these ideas were not production ready. &lt;/p&gt;

&lt;p&gt;On one hand, we had the articles which do well to describe how it would be implemented but fail to account for how best to set up the system so that it's able to track the authentication status with relation to the token state provided by the server. i.e what if the state of the application says this user is logged in, but the token is expired, and also what if the case is reversed.  and heck there were other things to think about.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do redirections take place in the components or in the actions?&lt;/li&gt;
&lt;li&gt;How do we handle asynchronous operations from actions?&lt;/li&gt;
&lt;li&gt;What the best practices when working with redux.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;At the end of the process, I came to the following conclusions, &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Promises are the way to go in handle redux based asynchronous actions, they are possibly best for all redux based actions.&lt;/li&gt;
&lt;li&gt;Actions are meant to focus on just performing actions of communicating with the servers and changing state, nothing else.&lt;/li&gt;
&lt;li&gt;Route changes have to happen in the components only, and nowhere else.&lt;/li&gt;
&lt;li&gt;All APIs actions have to be managed by an API class powered by axios. since its promise based, it fits directly into the promise based architecture of the system.&lt;/li&gt;
&lt;li&gt;Since we are taking all things asynchronously, use the async-await pattern where possible for more intuitive syntax.&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Relation between tokens and states.
&lt;/h3&gt;

&lt;p&gt;In the process of monitoring state, there 2 major properties that decided if a user was logged in or not. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The token received from the server meant to serve as the access token.&lt;/li&gt;
&lt;li&gt;The state of the isAuthenticated state property true or false. This property is dependent on the token property.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these two there were a few combinations to monitor when doing an auth check. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;isAuthenticated = true&lt;/strong&gt;, the token is found (User is actually logged in)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;isAuthenticated = false&lt;/strong&gt;, the token is found (User is logged in, but for some reason, the state is messed up)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;isAuthenticated = true&lt;/strong&gt;, the token is expired (User is not logged in on the server anymore, so we have to correspond)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;isAuthenticated = false&lt;/strong&gt;, the token is expired (User is really logged out ).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wrote an article in the past about a structure of this sort, it explains the details but in this process I changed a few things from that article, I think I would have to update it, but here are a few things to note, if you haven't read that article, there's a link to it. It would help you understand what's going on here.&lt;/p&gt;

&lt;p&gt;From that article there were 3 major components handling routing.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AppCheck container&lt;/strong&gt; - Taking charge of updates on the routes to note if the user is logging in or logging out, in order to do the appropriate redirect.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EnsureLoggedInContainer&lt;/strong&gt; - making sure the user visiting these routes is authenticated&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;EnsureVisitorContainer&lt;/strong&gt; - making sure the user visiting these routes is a visitor(not logged in).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Well without further ado here are my proposed changes to these components.&lt;/p&gt;

&lt;p&gt;On AppCheck component, I added a componentDidMount lifecycle hook to check for the presence of the token in relation to the state and make the appropriate changes to the state.&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;componentDidMount&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;currentURL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;pages&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="c1"&gt;// note isLoggedIn is mapped directly to isAuthenticated by redux connect&lt;/span&gt;

    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;uat&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;switch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
      &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; 
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
          &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;actions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;logout&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// this action automatically changes the state of isAuthenticated to false&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
      &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;token&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
          &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;actions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;autoLogin&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// this action automatically changes the state of isAuthenticated to true&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;&lt;span class="p"&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;p&gt;Apparently, this is the only change I needed to make to my checks on AppCheck the other checks (EnsureLoggedInContainer and EnsureVisitorContainer) pretty much remain the same.&lt;/p&gt;

&lt;h3&gt;
  
  
  Redux setup with promises.
&lt;/h3&gt;

&lt;p&gt;In the project, all actions returned promises, well all actions that were going to be called by the component via the mapDispatchToProps function. Using the thunk middleware from the redux-thunk setup promise functionalities were provided and I  was able to write action functions like this.&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="nx"&gt;actionType&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;../action-type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;api&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;./&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;autoLogin&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;actionType&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;LOGGED_IN&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&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;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;error here&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;signup&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;getState&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// do cool stuff then resolve/reject&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;api&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;/auth/register&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;params&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;autoLogin&lt;/span&gt;&lt;span class="p"&gt;()).&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;You successfully signed up!!!&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;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;&lt;span class="na"&gt;status&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;error&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="na"&gt;message&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Something went wrong!!!&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;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;err&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="nx"&gt;err&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see signup function and autoLogin both use promises to handle their operations. Thus allowing us to defer operations based on these actions until they were completed. In order to interact with API endpoints, I wrote up a class called API for interacting with the APIs via axios.&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="nx"&gt;axios&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;axios&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{},&lt;/span&gt; &lt;span class="nx"&gt;running&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;API&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;

    &lt;span class="nx"&gt;SIGNUP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;
    &lt;span class="nx"&gt;LOGIN&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="dl"&gt;''&lt;/span&gt;
    &lt;span class="nx"&gt;CREATE_PROJECT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;''&lt;/span&gt;

    &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}){&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;create&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;options&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;running&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;respond&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;running&lt;/span&gt;&lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{};&lt;/span&gt;
            &lt;span class="nx"&gt;func&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;status&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;};&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;type&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
                    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;apply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;args&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&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="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                    &lt;span class="p"&gt;})&lt;/span&gt;
                    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
                        &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;response&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="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;resp&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
                    &lt;span class="p"&gt;});&lt;/span&gt;
            &lt;span class="p"&gt;}.&lt;/span&gt;&lt;span class="nx"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;get&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;post&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;put&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;put&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;patch&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;patch&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;delete&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;delete&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;arguments&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;getHeaders&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;headers&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;getHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;headerIs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;setHeaders&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;new_headers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;new_headers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;renew&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;setHeader&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;defaults&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;common&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;value&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="nx"&gt;removeHeader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;norenew&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;delete&lt;/span&gt; &lt;span class="nx"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;norenew&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;renew&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="nx"&gt;renew&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;axios&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;axios&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
            &lt;span class="c1"&gt;// baseURL: process.env.API_BASE_URL,&lt;/span&gt;
            &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;headers&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;API&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At its base its a simple class actually for manipulating headers and making sure to provide the proper bearer token on all requests, since axios changes are effected across the app, changes on this class run through the entire project via one instance defined in the index 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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;api&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;API&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;baseURL&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;API_BASE_URL&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;p&gt;This is the instance imported in all actions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Toasts and Notifiers.
&lt;/h2&gt;

&lt;p&gt;It's good UI to let the users know something has happened or something is happening, or if an error occurred. With the promised based flow its usually really easy to catch these errors and since all actions "then" and catch phrases are handled in the components, we can essentially use a component-based toast handler or notifier. &lt;/p&gt;

&lt;p&gt;In the project, I opted for the react-toastify plugin component its available on npm.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusions
&lt;/h2&gt;

&lt;p&gt;This week would complete all respective frontend implementation hopefully, I really do hope to make this count (putting on my clown nose). After this phase the APIs would be explored and I'd get into the nitty-gritty of how spectre works with relation to version control systems and servers.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>frontend</category>
      <category>productdevelopment</category>
    </item>
    <item>
      <title>Journey to full-stack engineering - Building lean frontends.</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Wed, 08 Aug 2018 17:01:04 +0000</pubDate>
      <link>https://dev.to/legobox/journey-to-full-stack-engineering---building-lean-frontends-3odj</link>
      <guid>https://dev.to/legobox/journey-to-full-stack-engineering---building-lean-frontends-3odj</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This post was originally published on my blog at &lt;a href="https://medium.com/legobox/journey-to-full-stack-engineering-building-lean-frontends-f5f438303a72"&gt;legobox&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So it's been a little over 3 weeks since I started building out spectre. 2 weeks ago, all designs were completed and it was time to get into the nitty-gritty of implementation. In this phase starting out with the front end was the most reasonable idea to me, it usually is the most reasonable idea.&lt;br&gt;
Most would vouch for building out your APIs first, but that requires some real significant foresight, in this case, the app has a simple core.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Managing projects deployments to servers.&lt;/li&gt;
&lt;li&gt;Managing processes run via ssh and keeping logs.&lt;/li&gt;
&lt;li&gt;Managing users and collaborators.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are the major points that required an API, therefore I’ve decided to take on frontend first so as to be able to get a proper view of how these APIs would be used.&lt;/p&gt;

&lt;h2&gt;
  
  
  Thought process
&lt;/h2&gt;

&lt;p&gt;My development process is largely deep in the scrum methods, but I combine with the use of KPIs to get the most out of myself, Therefore over weeks I set out tasks to accomplish on scrum board and attach KPI scores to them and proceed to try my best to reach a target KPI score, sometimes I hit it, sometimes I don’t, but it always get’s the ball rolling.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools and stack
&lt;/h2&gt;

&lt;p&gt;Being an advocate for the SPA (Single page application) I really love them in terms of structure. an SPA provides several benefits, for those of us who are not familiar with the term, let's start from the beginning.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;SPA are applications whose entire frontend is loaded in a single file (index.html typically) this allows them to load all their resources once and have the frontend operate seamlessly without the need to load other pages from the servers.&lt;br&gt;
The only data loaded after loading an SPA app is JSON response and data that might be required in different areas around the entire application.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Framework&lt;/strong&gt;&lt;br&gt;
In this case, my SPA tool is the react javascript framework. I only started coding on react about a year plus, for the most part, It's been a really cool tool to use, good structure in terms of features and allow for real quick prototyping.&lt;/p&gt;

&lt;p&gt;I also combine react with a few other libraries which serve different purposes in the development process. a few of these include&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Reactstrap - A react based alternative to traditional bootstrap (quick prototyping here 😒 )&lt;/li&gt;
&lt;li&gt;Chart.js - A javascript library for displaying charts (as the name implies)&lt;/li&gt;
&lt;li&gt;Redux - The almighty redux, state management in react doesn’t come better than that.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Servers&lt;/strong&gt;&lt;br&gt;
I’m using a VPS box to serve the project for live preview.&lt;br&gt;
At the moment the following pages have been implemented.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Homepage&lt;/li&gt;
&lt;li&gt;Login&lt;/li&gt;
&lt;li&gt;Signup&lt;/li&gt;
&lt;li&gt;Dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These were created in direct accordance to the design specs, all implementations can be found on the server preview site&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Deployment&lt;/strong&gt;&lt;br&gt;
The project is set up to use gitlab’s CI integrations to set up a CI system which deploys to the servers whenever I push to master. To learn about that, I wrote a piece once upon a time about that.&lt;/p&gt;

&lt;p&gt;Setting up the servers was accomplished using ansible, using docker on the project is just overkill to me cause all other projects on my VPS running on the same stack most of the time, except for custom software or situations that warrant them.&lt;/p&gt;

&lt;h2&gt;
  
  
  The way forward.
&lt;/h2&gt;

&lt;p&gt;During the course of the week, I’ll be implementing the other interfaces as designed, in order to get a clear idea of what it means to be a user using the application. would likely call for some A/B testing and some site analysis to get a clear glimpse of all pressure points using the tool. Being a saas app it's important the project focuses deeply on the workings and functionality since it, not a social facing system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;By the end of the new week, I should have all the interfaces implemented and ready to go, alongside the basic setup for the authentication features.&lt;br&gt;
Building out a platform is always fun at some points and for the most part, it opens a partway to a whole lot more. In terms of work habits ethics and time management, maybe I’d write about that some other time, but at the moment we are making good progress.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>frontend</category>
      <category>productdevelopment</category>
    </item>
    <item>
      <title>Journey to Full-stack, Week of design 2.</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Tue, 17 Jul 2018 05:14:01 +0000</pubDate>
      <link>https://dev.to/legobox/journey-to-full-stack-week-of-design-2-1c8p</link>
      <guid>https://dev.to/legobox/journey-to-full-stack-week-of-design-2-1c8p</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article was originally published under my blog &lt;a href="https://medium.com/legobox/journey-to-fullstack-engineering-week-of-design-2-fedfff0eff8" rel="noopener noreferrer"&gt;@legobox&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Thoughts.
&lt;/h1&gt;

&lt;p&gt;Since the process began, a large portion of the process focused on designs and having the ideas of UX - user experience with respect to the application in mind. For the most part, we've been able to do this. Until minor setbacks.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;2 weeks ago I wasn't exactly able to make much progress with respect to design and development mostly due to the fact that my computer got damaged, Fixed up the next week, so project's back on track. For those diligently awaiting updates with reference to the series, really sorry for the lazy week.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Moving on, I've been able to complete designs of the application. Lets have a look at progress made in this process ( sounds like a rap ).&lt;/p&gt;

&lt;h2&gt;
  
  
  Progress.
&lt;/h2&gt;

&lt;p&gt;Last week was also design focused, targeted to completing the design phase, all the while still keeping in mind the ideas of minimalist designs, and making sure not to bug with unnecessary information.&lt;/p&gt;

&lt;p&gt;Designs I was able to complete included the following.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Account Management&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_D20CBE0CA4BF0177C662E0391D9783B7C177E3DD0E1BF54F40E0E14D6ED4B7A7_1531800643094_Profile%2BSettings%2B-%2BServer%2BDetails.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_D20CBE0CA4BF0177C662E0391D9783B7C177E3DD0E1BF54F40E0E14D6ED4B7A7_1531800643094_Profile%2BSettings%2B-%2BServer%2BDetails.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As the name suggests, this interface focused on the interface of the profile management sections where users would be able to make changes and updates to their profiles.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Token management&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_D20CBE0CA4BF0177C662E0391D9783B7C177E3DD0E1BF54F40E0E14D6ED4B7A7_1531800657656_Profile%2BSettings%2B-%2BKey%2Bmanagement.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_D20CBE0CA4BF0177C662E0391D9783B7C177E3DD0E1BF54F40E0E14D6ED4B7A7_1531800657656_Profile%2BSettings%2B-%2BKey%2Bmanagement.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Project spectre would use tokens from GitHub, Gitlab or Bitbucket respectively in order to manage the deployment of the project based on web-hooks from these services. This interface focuses on integrations and tokens with respect to these services. So as to be able to access web-hook requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Billing&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_D20CBE0CA4BF0177C662E0391D9783B7C177E3DD0E1BF54F40E0E14D6ED4B7A7_1531800668551_Profile%2BSettings%2B-%2BBilling.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_D20CBE0CA4BF0177C662E0391D9783B7C177E3DD0E1BF54F40E0E14D6ED4B7A7_1531800668551_Profile%2BSettings%2B-%2BBilling.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This interface deals with the billing and subscriptions of the users with respect to their plans on projects and servers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Improved designs.
&lt;/h2&gt;

&lt;p&gt;The following designs were improved in multiple aspects and extended to include and improve their atheistic. These interfaces include the following.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project management interface&lt;/li&gt;
&lt;li&gt;Home dashboard interface&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Shortcomings and achievements.
&lt;/h2&gt;

&lt;p&gt;In the process, there have been several shortcomings, and some achievements, These include the following.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Shortcomings&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I'm pretty slow in design, it usually takes me a bit more time but In the process of working through the week I've been able to improve.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Achievements&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I've been able to clearly get a grasp of the entire project structure and ready to enter the implementation phase.&lt;/li&gt;
&lt;li&gt;All designs have been completed
## Targets of the week.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The new week (this week) would be focused on implementations of these designs, the idea is to build out the initial structure and then focus on soft touches ( areas that can be improved ).&lt;/p&gt;

&lt;p&gt;Interfaces would be implemented in react, Those I hope to fully complete this week include the following.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Landing page&lt;/li&gt;
&lt;li&gt;Login Page&lt;/li&gt;
&lt;li&gt;Sign up page&lt;/li&gt;
&lt;li&gt;Home dashboard&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Conclusion.
&lt;/h2&gt;

&lt;p&gt;Building out has been tasking, but for the most part is that it has more to do with self-management and process. This means the process of managing the software development cycle as well as project planning, go a long way in deciding the viability and feasibility of a project.&lt;/p&gt;

&lt;p&gt;As a one-man team, sometimes it feels overwhelming, that's why it often pays to have all steps ordered in detail and sections to session blocks to as to enable one develop in an organised manner.&lt;/p&gt;

</description>
      <category>designs</category>
      <category>programming</category>
    </item>
    <item>
      <title> Journey to fullstack engineering - Week of Design.</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Mon, 02 Jul 2018 01:30:48 +0000</pubDate>
      <link>https://dev.to/legobox/-journey-to-fullstack-engineering---week-of-design-15jg</link>
      <guid>https://dev.to/legobox/-journey-to-fullstack-engineering---week-of-design-15jg</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This is article is part of the journey to full-stack engineering series, My journey in building whole products as a one-man team — Hopefully.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  2 weeks ago (review)
&lt;/h1&gt;

&lt;p&gt;2 weeks ago I began this process of trying to create full products taking to view all aspects of the product development process, My aim is to simply build useful applications and encourage other engineers to have the entire product in mind when trying to build applications, be they part of a team of a one-man army.&lt;/p&gt;

&lt;p&gt;Like I explained in the last article, I’m just a curious soul who happened to enjoy the process of learning and building software, therefore, I never really stuck to any particular aspect of development with a strict label, therefore I love to take on any aspect I have to. thus, code wrangler here. From the last weeks' article I decided to create a product, so here’s a brief overview of what the product is. I got a cool code name for it though, I like to call it Spectre — Like the James Bond movies.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A deployment management system for developers and teams to manage the deployment of code from the repository to the server.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Essentially spectre is quite equivalent to Laravel’s envoyer, but in our case, we would handle deployments for many different stacks and project types. e.g create-react-app projects, vue-cli projects, laravel projects (obviously), express projects, over time (with this entire thing being successful) I aim to integrate more stack types to the project.&lt;/p&gt;

&lt;h1&gt;
  
  
  Last week ( Design all the way )
&lt;/h1&gt;

&lt;p&gt;So this week was focused on design and app structure, this is pretty much the very first step in developing applications for me. It gives me insight into how users would use the product and how it would flow with respect to performing its designated actions, for more user-focused applications like social networks and eCommerce, this process would pretty much be proceeded by process and sessions focused on customer analysis and user profiling, but in this case I didn’t follow through on those cause I pretty much know who my target users are — platforms and developers looking to push code and manage seamless deployment, without much technical overhead.&lt;/p&gt;

&lt;p&gt;So with all set lets have a look at the proposed application structure.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I usually manage projects using trello to create broad overviews of weekly features and then using todoist in placing these into daily activities and development sessions be it code or design.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Homepage designs.
&lt;/h2&gt;

&lt;p&gt;Homepage and landing pages are usually the places to really do conversion, and I wanted to create something beautiful, but at the same time simply and get the message across fast and quick, I intended to create a gif though which would display a sample of the app in use as part of the page setup but I didn't have that yet, so at the moment I settled for illustrations.&lt;br&gt;
My skills with illustrations are pretty rusty though but I think I pulled some decent work on those. getting better with practice. here’s a preview, most of the designs for the project are available on dribbble&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311137802_Home%2B1.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311137802_Home%2B1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I think its still a bit rusty, speedy work here, but the home/landing page is going to be undertaking lots of changes as the project goes along, therefore I’m not trying to have everything in there on the first go.&lt;/p&gt;

&lt;p&gt;Up next is the login and signup sections.&lt;/p&gt;

&lt;h2&gt;
  
  
  Login and signup
&lt;/h2&gt;

&lt;p&gt;With login and signup, I wanted to have a different set of illustrations and go with the central card design, I think not many developers oriented products focus on design concepts like this so I wanted to do my best or whatever I’ve got rather in pulling this off.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311424313_Signup%2B1.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311424313_Signup%2B1.png"&gt;&lt;/a&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311441464_Login.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311441464_Login.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For the most part, I think its okay, but there could be several adjustments and Improvements to be made to these sections, I’d love to get some engagement from designers in the house and see what they can make of these, hopefully getting some ideas of ways to improve on the concept.&lt;/p&gt;

&lt;p&gt;For the most part, I’m going for a minimalist concept, the next section is the Home Dashboard where users can get an overview of their projects which are being managed by the platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dashboard
&lt;/h2&gt;

&lt;p&gt;This page would give the user a quick overview of their project or projects and help them get a broad overview of things, form the design, I intend that the dashboard handle on project overview at a time, as projects would handle servers and have collaborators, manage deployment hooks and offer consistency checks using heartbeats.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311704430_Dashboard%2B1.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530311704430_Dashboard%2B1.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although I think this page too could need some improvements and upgrades, for the most part, this is a basic overview of what it would entail, I’m working on improving as I go along.&lt;br&gt;
next is the project settings.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project settings
&lt;/h2&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530312120347_Project%2BSettings%2B-%2BProject%2BDetails.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530312120347_Project%2BSettings%2B-%2BProject%2BDetails.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The above is the settings page for the projects, This section would allow users be able to manage their project details and change certain information and variables with respect to the project, same as the rest of the design process, it’s aimed to be minimalist and straight to the point.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530312425403_Project%2BSettings%2B-%2BServer%2BDetails.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530312425403_Project%2BSettings%2B-%2BServer%2BDetails.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the Project’s Server management system, this manages the servers the project is connected, it would allow users to be able to add, remove and update servers with new keys when needed.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530312477776_Project%2BSettings%2B-Collborators.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_C8E47E5F5ED0C422322A743DF57E08596C703485A339139552F57A1B289305C1_1530312477776_Project%2BSettings%2B-Collborators.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This section would manage the collaborators of the project would the owner account have supreme control over the project, with the permissions to both delete a project, assign admins and limit other users access to the project.&lt;/p&gt;

&lt;h1&gt;
  
  
  Work in progress
&lt;/h1&gt;

&lt;p&gt;At the moment the design process is still in progress and I aim to integrate whole functionalities into the project in order to have really usable products.&lt;br&gt;
Other designs upcoming with relation to the project include the following sections.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Profile / Account management

&lt;ul&gt;
&lt;li&gt;Profile Management&lt;/li&gt;
&lt;li&gt;Billing and Credit management&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Project Settings

&lt;ul&gt;
&lt;li&gt;Creating new server modal&lt;/li&gt;
&lt;li&gt;Adding new collaborator modal&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Errors and Toasts&lt;/li&gt;

&lt;li&gt;Improvements on

&lt;ul&gt;
&lt;li&gt;Home page designs&lt;/li&gt;
&lt;li&gt;Dashboard designs&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;h1&gt;
  
  
  Conclusions
&lt;/h1&gt;

&lt;p&gt;At the moment I’m still working the design phase, as a designer, it’s more about getting a feel of what the user experience using the application and making as intuitive enough as possible for them so they have a less steep learning curve in using the app.&lt;/p&gt;

&lt;p&gt;A lot of these would come down to getting into the mindset, at the moment I’m predominantly thinking as a designer and usually, it’s usually a revealing process. For the most part, though I work on designs during the morning sessions, I have better energy during those sessions, focusing on code-based sessions during the late afternoon sessions. My primary design tool is Figma, not an advocate or something like that, I just really fancy the tool and actually rated it as a 10 in designing cool UI/UX experiences.&lt;/p&gt;

&lt;p&gt;By the end this week, all designs with relation to the profile management would be completed and It would be a deep dive into the development processes involved in building out the solution.&lt;/p&gt;

</description>
      <category>ux</category>
      <category>programming</category>
      <category>design</category>
    </item>
    <item>
      <title>Journey to fullstack engineering.</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Sat, 23 Jun 2018 15:51:46 +0000</pubDate>
      <link>https://dev.to/legobox/journey-to-fullstack-engineering-5b4k</link>
      <guid>https://dev.to/legobox/journey-to-fullstack-engineering-5b4k</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This article was originally posted in the &lt;a href="http://medium.com/legobox" rel="noopener noreferrer"&gt;legobox blog&lt;/a&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Hmm fullstack 💭
&lt;/h1&gt;

&lt;p&gt;In the year 2011, I started coding semi-professionally, It's a bit difficult to explain what that means though, but In essence, I was creating little projects which some individuals find interesting. I had no specific learning path in development and my strategy to learning, was almost like the Nigerian super eagles' strategy, solve your problem as they come ( as e dey hot).&lt;/p&gt;

&lt;p&gt;This forced me to dabble in a lot of things ranging from frontend development using HTML, CSS, and Javascript, at its infancy as of then to working with PHP and MySQL for the database, or python in place of PHP when a friend recommended it. &lt;/p&gt;

&lt;p&gt;This is not a piece on my story, but I just want to say I never knew when I became a full-stack developer, didn't learn with a coding boot camp, never been to Andela and what's more only met the coding community in 2015, since then I learned about several other tools and technologies that enabled me to do better work. I learnt to code for the love of it, I was hooked, I still am. but then the question came to mind, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Am I really full-stack?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;See full-stack is a bit complicated for some to believe that someone could actually embody all attributes of full-stack development, but in order to me to really bring it to view, we have to look at what it would encompass as a whole.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UX / UI experience as a designer.&lt;/li&gt;
&lt;li&gt;Frontend Development and Interface implementation.&lt;/li&gt;
&lt;li&gt;API development and Backend Development&lt;/li&gt;
&lt;li&gt;Deployment, Testing, and Development Cycle management (DevOps)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In each item in this list there are several more checklists to be met, so how would one respond to a title in which each section requires several if not some really extensive understanding or knowledge in each area?&lt;/p&gt;

&lt;h1&gt;
  
  
  Is the full-stack myth real?
&lt;/h1&gt;

&lt;p&gt;Full-stack developers are real, yes I said it they are real, for the fact you haven't met a real one doesn't mean they don't exist, and if you've met one, then you surely know they are real, even more, I think full-stack developers go-ahead to build businesses and products because they gain an integral ability to see the entire pipeline as a whole and not just separate components. For that reason, I think there are 2 major types of full-stack engineers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;please the following terms were coined by me and me alone, no other should be held responsible (aka, they are not real things outside of this article)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Single point full-stack developers&lt;/strong&gt; -- These developers usually know one part better than the rest, and therefore they would usually be able to communicate with teams working in the other sections. Outside of the team, they'd only take on the other sections if absolutely necessary and would usually be reluctant to even look for advancements in these sections.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Product focused full-stack developers --&lt;/strong&gt;These engineers are more product inclined and therefore find it blurry seeing a separation of concerns between the different sections, they are usually looking at the product as a whole and would usually work in order to make the best features available to the central product, these guys typically make good freelancers and may not perform well in a large team.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yea there's a third (The Liars) - These guys are novices in every section, even the once they seem most prominent at, in the end, they are hobbyist in all areas.&lt;/p&gt;

&lt;p&gt;So in order to become a full-stack we have to understand where we fall under, Modern day software development has opened up resource to a whole lot of tools that confuse more than they help, and full-stack development has become a real beast.&lt;/p&gt;

&lt;h1&gt;
  
  
  Modern-day full stack.
&lt;/h1&gt;

&lt;p&gt;A newbie looking to become a developer today is in for a real fight. but it gets easier as you go along. The repo link below gives you an insight into what it means to be a modern day fullstack developer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/kamranahmedse/developer-roadmap" rel="noopener noreferrer"&gt;https://github.com/kamranahmedse/developer-roadmap&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So here’s an overview.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529762946371_screenshot-github.com-2018.06.23-15-03-36.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529762946371_screenshot-github.com-2018.06.23-15-03-36.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the end it all comes down to 3 major plays, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Frontend &lt;/li&gt;
&lt;li&gt;Backend&lt;/li&gt;
&lt;li&gt;DevOps&lt;/li&gt;
&lt;/ul&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529763044885_screenshot-github.com-2018.06.23-15-10-21.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529763044885_screenshot-github.com-2018.06.23-15-10-21.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Frontend Developement comes down to the frameworks, but these are easier to understand once you get the basics down.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTML &lt;/li&gt;
&lt;li&gt;Css

&lt;ul&gt;
&lt;li&gt;On the advanced side &lt;/li&gt;
&lt;li&gt;Preprocessors

&lt;ul&gt;
&lt;li&gt;Scss&lt;/li&gt;
&lt;li&gt;Less&lt;/li&gt;
&lt;li&gt;PostCss&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Css Frameworks

&lt;ul&gt;
&lt;li&gt;Bootstrap&lt;/li&gt;
&lt;li&gt;MaterializeCss&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;/li&gt;

&lt;li&gt;Javascript.

&lt;ul&gt;
&lt;li&gt;The battle of the frameworks&lt;/li&gt;
&lt;li&gt;React&lt;/li&gt;
&lt;li&gt;Vue&lt;/li&gt;
&lt;li&gt;Angular&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Testing

&lt;ul&gt;
&lt;li&gt;The less known tools of frontend development&lt;/li&gt;
&lt;li&gt;Jest&lt;/li&gt;
&lt;li&gt;Mocha&lt;/li&gt;
&lt;li&gt;Karma&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;This goes deep. But I’m pretty sure you get the gist. Backend Development on the other hand is another deep trench.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529763317692_screenshot-github.com-2018.06.23-15-12-17.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529763317692_screenshot-github.com-2018.06.23-15-12-17.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Backend development is really deep and would require another article to really look at what’s going on there in 2018, but a simple overview would show the following.&lt;/p&gt;

&lt;p&gt;Backend development revolves around to sets of languages&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The Scripting Languages&lt;/li&gt;
&lt;li&gt;The Functional Languages&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A full-stack is not expected to know all but is supposed to really understand one. With the scripting languages, we have a look at the following technologies pretty sure you’ve heard of them.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Php&lt;/li&gt;
&lt;li&gt;Node&lt;/li&gt;
&lt;li&gt;Python&lt;/li&gt;
&lt;li&gt;Ruby&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;on the functional side we have&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Elixr&lt;/li&gt;
&lt;li&gt;Erlang&lt;/li&gt;
&lt;li&gt;Clojure&lt;/li&gt;
&lt;li&gt;Haskell&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And there’s more development patterns and technologies with relation to APIs and request-response systems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;GraphQL&lt;/li&gt;
&lt;li&gt;Oauth&lt;/li&gt;
&lt;li&gt;Redis&lt;/li&gt;
&lt;li&gt;WebSockets&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We also have job and task management as well as cron job management using tools like&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Message Brokers

&lt;ul&gt;
&lt;li&gt;RabbitMD&lt;/li&gt;
&lt;li&gt;Iron Worker&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;Search Systems

&lt;ul&gt;
&lt;li&gt;Elastic Search&lt;/li&gt;
&lt;li&gt;Sphinx&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;and so much more. and it doesn't stop there, there’s DevOps to worry about.&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529763425976_screenshot-github.com-2018.06.23-15-16-44.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E6A5B68F2AE20F0779AFCC85CE4F089BBA16AA968C9C6FB4A6B43EF7A600961D_1529763425976_screenshot-github.com-2018.06.23-15-16-44.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This section deals with all factors involved in managing an application from development to deployment, this includes managing its resource system, containers and runtime environments as well as server configurations and load balancing.&lt;/p&gt;

&lt;p&gt;So how best to describe a full-stack developer if not as someone who loves all processes involved in taking an idea from concept to launched product.&lt;/p&gt;

&lt;h1&gt;
  
  
  My experiment — Becoming the product developer.
&lt;/h1&gt;

&lt;p&gt;In order to answer my own questions, I have decided to take on the process of building a few products from ideas and concepts for launching them. In this process, I would share my experience building each of these and possibly certify myself with a realization that full-stack developers are at their core product enthusiasts who want to see the product becoming what it is from an idea.&lt;/p&gt;

&lt;p&gt;My process would involve a few weeks of building products — from my personal ideas taking them from concept to design, to frontend and interface implementation to functionality (backend) and deployment/testing (DevOps).&lt;/p&gt;

&lt;p&gt;My first Idea is code named Spectre (Project Spectre) — A deployment management system for developers and teams to manage the deployment of code from the repository to the server. At the moment I'm in the process of developing the platform and I hope to release it before September. every week, I’ll document and review the process and what it means to build a product in all respect. &lt;/p&gt;

&lt;p&gt;I hope for this to be a wonderful experience, never built an open project before but I’m willing to have the idea out there and would love to share my in-process and in-progress stats and review on who I go about implementing features.&lt;/p&gt;

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

&lt;p&gt;Journey to full-stack engineering is targetted to help others learn and understand that full stack development isn’t as hard as some think it to be.&lt;/p&gt;

&lt;p&gt;My Ideas might be premature, but the intentions are focused on proving the full-stack myth. As I would always say, a javascript developer who knows frontend development and uses node (javascript on the backend) and knows how to work with Nginx and docker,  can be accorded a full-stack title (there’s no diploma for these things ), but it all depends on the quality of work and knowledge.&lt;/p&gt;

&lt;p&gt;the key is switching to a product development mindset, think of yourself as owning the idea and working with the understanding that you are looking for the best possible means of solving your problem. One step at a time. &lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>career</category>
    </item>
    <item>
      <title>Getting started with caddy web server</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Sat, 26 May 2018 09:57:45 +0000</pubDate>
      <link>https://dev.to/legobox/another-kickass-server-called-caddy-4o1f</link>
      <guid>https://dev.to/legobox/another-kickass-server-called-caddy-4o1f</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The piece was originally published on my blog at &lt;a href="https://medium.com/legobox/another-kickass-server-called-caddy-2bc24e8d8028"&gt;legobox&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Background
&lt;/h1&gt;

&lt;p&gt;Last year I came across a server called caddy, I kinda liked it because it's name sounded similar to that of one of my favourite rap artiste cardi b, sounds weird right?, just kidding, that not why I loved the caddy web server, rather it was a much simpler server to install and configure than nginx, and what’s more it comes with its own integration of ssl certificates for your domains and these includes wildcards, in this article we are going to take a birds eye view of the server and get to understand why it's a great tool.&lt;/p&gt;

&lt;h1&gt;
  
  
  Prerequisite
&lt;/h1&gt;

&lt;p&gt;There are really not much to know about, before diving into this, but it would be nice if you’ve got the following.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;At least a good understanding of servers and proxying.&lt;/li&gt;
&lt;li&gt;A general understanding of SSL - Secure Shell Layer and HTTPs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With these, you are good to go.&lt;/p&gt;

&lt;h1&gt;
  
  
  Origins.
&lt;/h1&gt;

&lt;p&gt;Long story short caddy was created by Light Code Labs, and made open source, it operates in a similar manner to nginx with the use of server blocks, just that in this case all configurations can be done in one file called the Caddyfile, It implements https (yea emphasis on s) once its specified as part of the domain name.&lt;/p&gt;

&lt;p&gt;Its light and lightening fast and has lots of really good documentation associated with it. Since I’ve been able to convince you (hopefully), let us have a look at how we can install and setup caddy.&lt;/p&gt;

&lt;h1&gt;
  
  
  Setting up caddy
&lt;/h1&gt;

&lt;p&gt;First things first, you can download caddy by visiting the website (&lt;a href="https://caddyserver.com/download"&gt;https://caddyserver.com/download&lt;/a&gt;), installation is pretty straightforward and easy to get on with, Most of it has been specified by their documentation, If you are looking to set up for a docker container, you might be interested in checking out this docker image.&lt;/p&gt;

&lt;p&gt;If you downloaded the zip file, The follow these instructions to get rolling.&lt;/p&gt;

&lt;p&gt;First, put the caddy binary in the system wide binary directory and give it appropriate ownership and permissions:&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;sudo cp&lt;/span&gt; /path/to/caddy /usr/local/bin
    &lt;span class="nb"&gt;sudo chown &lt;/span&gt;root:root /usr/local/bin/caddy
    &lt;span class="nb"&gt;sudo chmod &lt;/span&gt;755 /usr/local/bin/caddy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Give the caddy binary the ability to bind to privileged ports (e.g. 80, 443) as a non-root user:&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;sudo &lt;/span&gt;setcap &lt;span class="s1"&gt;'cap_net_bind_service=+ep'&lt;/span&gt; /usr/local/bin/caddy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Set up the user, group, and directories that will be needed:&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;sudo &lt;/span&gt;groupadd &lt;span class="nt"&gt;-g&lt;/span&gt; 33 www-data
    &lt;span class="nb"&gt;sudo &lt;/span&gt;useradd &lt;span class="se"&gt;\&lt;/span&gt;
      &lt;span class="nt"&gt;-g&lt;/span&gt; www-data &lt;span class="nt"&gt;--no-user-group&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
      &lt;span class="nt"&gt;--home-dir&lt;/span&gt; /var/www &lt;span class="nt"&gt;--no-create-home&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
      &lt;span class="nt"&gt;--shell&lt;/span&gt; /usr/sbin/nologin &lt;span class="se"&gt;\&lt;/span&gt;
      &lt;span class="nt"&gt;--system&lt;/span&gt; &lt;span class="nt"&gt;--uid&lt;/span&gt; 33 www-data

    &lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; /etc/caddy
    &lt;span class="nb"&gt;sudo chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; root:www-data /etc/caddy
    &lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; /etc/ssl/caddy
    &lt;span class="nb"&gt;sudo chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; root:www-data /etc/ssl/caddy
    &lt;span class="nb"&gt;sudo chmod &lt;/span&gt;0770 /etc/ssl/caddy
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Place your caddy configuration in the appropriate directory and give it appropriate ownership and permissions:&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;sudo cp&lt;/span&gt; /path/to/Caddyfile /etc/caddy/
    &lt;span class="nb"&gt;sudo chown &lt;/span&gt;www-data:www-data /etc/caddy/Caddyfile
    &lt;span class="nb"&gt;sudo chmod &lt;/span&gt;444 /etc/caddy/Caddyfile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the home directory for the server and give it appropriate ownership&lt;br&gt;
and permissions:&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;sudo mkdir&lt;/span&gt; /var/www
    &lt;span class="nb"&gt;sudo chown &lt;/span&gt;www-data:www-data /var/www
    &lt;span class="nb"&gt;sudo chmod &lt;/span&gt;555 /var/www
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's assume you have the contents of your website in a directory called 'example.com'.&lt;br&gt;
Put your website into place for it to be served by caddy:&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;sudo cp&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; example.com /var/www/
    &lt;span class="nb"&gt;sudo chown&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; www-data:www-data /var/www/example.com
    &lt;span class="nb"&gt;sudo chmod&lt;/span&gt; &lt;span class="nt"&gt;-R&lt;/span&gt; 555 /var/www/example.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'll need to explicitly configure caddy to serve the site from this location by adding&lt;br&gt;
the following to your Caddyfile if you haven't already:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    example.com &lt;span class="o"&gt;{&lt;/span&gt;
        root /var/www/example.com
        ...
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Install the systemd service unit configuration file, reload the systemd daemon,&lt;br&gt;
and start caddy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    wget https://raw.githubusercontent.com/mholt/caddy/master/dist/init/linux-systemd/caddy.service
    &lt;span class="nb"&gt;sudo cp &lt;/span&gt;caddy.service /etc/systemd/system/
    &lt;span class="nb"&gt;sudo chown &lt;/span&gt;root:root /etc/systemd/system/caddy.service
    &lt;span class="nb"&gt;sudo chmod &lt;/span&gt;644 /etc/systemd/system/caddy.service
    &lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl daemon-reload
    &lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start caddy.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Have the caddy service start automatically on boot if you like:&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;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;caddy.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If caddy doesn't seem to start properly you can view the log data to help figure out what the problem is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    journalctl &lt;span class="nt"&gt;--boot&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; caddy.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use &lt;code&gt;log stdout&lt;/code&gt; and &lt;code&gt;errors stderr&lt;/code&gt; in your Caddyfile to fully utilize systemd journaling.&lt;/p&gt;

&lt;p&gt;If your GNU/Linux distribution does not use &lt;em&gt;journald&lt;/em&gt; with &lt;em&gt;systemd&lt;/em&gt; then check any logfiles in &lt;code&gt;/var/log&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you want to follow the latest logs from caddy you can do so like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    journalctl &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nt"&gt;-u&lt;/span&gt; caddy.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can make other certificates and private key files accessible to the &lt;code&gt;www-data&lt;/code&gt; user with the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;    setfacl &lt;span class="nt"&gt;-m&lt;/span&gt; user:www-data:r-- /etc/ssl/private/my.key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h1&gt;
  
  
  The caddy file
&lt;/h1&gt;

&lt;p&gt;While setting up you may have caught a glimpse of the caddyfile, now lets have a real look at it, how do we setup a server block, its as simple as this.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    https://mydopesite.com {
      root /path/to/site_files
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Voila, that simple. Let's break it down so we can understand it some more (since its so difficult)&lt;/p&gt;

&lt;h2&gt;
  
  
  Site Address
&lt;/h2&gt;

&lt;p&gt;The HTTP server uses site addresses for labels. Addresses are specified in the form &lt;code&gt;scheme&lt;/code&gt;&lt;code&gt;://&lt;/code&gt;&lt;code&gt;host&lt;/code&gt;&lt;code&gt;:&lt;/code&gt;&lt;code&gt;port&lt;/code&gt;&lt;code&gt;/&lt;/code&gt;&lt;code&gt;path&lt;/code&gt;, where all but one are optional.&lt;/p&gt;

&lt;p&gt;The host portion is usually localhost or the domain name. The default port is 2015 (unless the site qualifies for automatic HTTPS, in which case it's changed to 443 for you). The scheme portion is another way to specify a port. Valid schemes are "http" or "https" which represent, respectively, ports 80 and 443. If both a scheme and port are specified, the port takes precedence. For example (this table assumes automatic HTTPS is applied where it qualifies):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    :2015                    # Host: (any), Port: 2015
    localhost                # Host: localhost; Port: 2015
    localhost:8080           # Host: localhost; Port: 8080
    example.com              # Host: example.com; Ports: 80-&amp;gt;443
    http://example.com       # Host: example.com; Port: 80
    https://example.com      # Host: example.com; Ports: 80-&amp;gt;443
    http://example.com:1234  # Host: example.com; Port: 1234
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Wildcard characters &lt;code&gt;*&lt;/code&gt; can be used in a hostname. A wildcard must take the place of an entire domain label: &lt;code&gt;*.example.com&lt;/code&gt; is valid but &lt;code&gt;foo*.example.com&lt;/code&gt; is not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Path Matching.
&lt;/h2&gt;

&lt;p&gt;Some directives accept an argument that specifies a base path to match. A base path is a prefix. If the URL starts with the base path, it will be a match. For example, a base path of &lt;code&gt;/foo&lt;/code&gt; will match requests to &lt;code&gt;/foo&lt;/code&gt;, &lt;code&gt;/foo.html&lt;/code&gt;, &lt;code&gt;/foobar&lt;/code&gt;, and &lt;code&gt;/foo/bar.html&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Directives
&lt;/h2&gt;

&lt;p&gt;Most directives invoke a layer of middleware. Middleware is a small layer in the application that handles HTTP requests and does one thing really well. Middleware are chained together (pre-compiled, if you will) at startup. Only middleware handlers which are invoked from the Caddyfile will be chained in, so small Caddyfiles are very fast and efficient.&lt;/p&gt;

&lt;p&gt;The syntax of arguments varies from directive to directive. Some have required arguments, others don't. Consult the documentation of each directive for their signatures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Placeholders
&lt;/h2&gt;

&lt;p&gt;In some cases, directives will accept placeholders (replaceable values). These are words that are enclosed by curly braces &lt;code&gt;{ }&lt;/code&gt; and interpreted by the HTTP server at request-time. For example, &lt;code&gt;{query}&lt;/code&gt; or &lt;code&gt;{&amp;gt;Referer}&lt;/code&gt;. Think of them like variables. These placeholders have no relationship to the environment variables you can use in Caddyfiles, except we borrowed the syntax for familiarity.&lt;/p&gt;

&lt;p&gt;If you are looking to understand some more about this, it would be wonderful to invest some time into the docs. (click here to get there)&lt;/p&gt;

&lt;h2&gt;
  
  
  Proxying and Load balancing in caddy
&lt;/h2&gt;

&lt;p&gt;Pulling off proxy actions in caddy is as simple as setting up the proxy directive.&lt;br&gt;
This middleware adds a placeholder that can be used in log formats: {upstream} - the name of the upstream host to which the request was proxied.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    https://mydomain.here{
      // usual structure is (proxy from to)
      proxy /api localhost:9005
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above proxy makes all /api routes redirect to localhost:9005 (the machine’s localhost).&lt;br&gt;
You can use the policy options in the proxy to set up proxying algorithm based on the same concept if the nginx algorithms.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    proxy / web1.local:80 web2.local:90 web3.local:100 {
            policy round_robin
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here are the policies associated with load balancing&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Policies&lt;/strong&gt;&lt;br&gt;
There are several load balancing policies available:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;random (default) - Randomly select a backend&lt;/li&gt;
&lt;li&gt;least_conn - Select backend with the fewest active connections&lt;/li&gt;
&lt;li&gt;round_robin - Select backend in round-robin fashion&lt;/li&gt;
&lt;li&gt;first - Select the first available backend in the order they are defined in the Caddyfile&lt;/li&gt;
&lt;li&gt;ip_hash - Select backend by hashing the request IP, distributing evenly over the hash space based on the total number of backends&lt;/li&gt;
&lt;li&gt;uri_hash - Select backend by hashing the request URI, distributing evenly over the hash space based on the total number of backends&lt;/li&gt;
&lt;li&gt;header - Select by hashing the value of a given header, specified by the [value] after the policy name, distributing evenly over the hash space based on the total number of backends&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;It’s clear by now that I do love working with caddy, it's a simple tool that does the job so well, there are many options for web servers out there, but the benefits this server gives is quite exciting and worthwhile.&lt;/p&gt;

&lt;p&gt;If you are looking to learn some more about it, feel free to check out the project on &lt;a href="https://caddyserver.com"&gt;https://caddyserver.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>devops</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>My react routing structure</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Fri, 25 May 2018 10:12:40 +0000</pubDate>
      <link>https://dev.to/legobox/my-react-routing-structure-d8i</link>
      <guid>https://dev.to/legobox/my-react-routing-structure-d8i</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This piece was originally posted on my blog at &lt;a href="https://medium.com/legobox/my-react-routing-structure-20772c685810"&gt;legobox&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Background
&lt;/h1&gt;

&lt;p&gt;I build frontend applications and APIs often, usually I use a variety of tools, but react has been something I find interesting, enabling me to build fast and quick, although I could argue that vue matches it word for word, but that’s not the argument of the day, enough of the react vs Vue bullshit, so I do both. They are both amazing and I’m glad there are alternatives of frameworks to choose from. In the process of developing and creating applications using react, I came up with a general structure and routing pattern for my applications. &lt;/p&gt;

&lt;p&gt;I consider this something I’d love to share and hopefully improve with directives from the community.&lt;/p&gt;

&lt;h1&gt;
  
  
  Pre-requisites
&lt;/h1&gt;

&lt;p&gt;To this article, there are only two pre-requisites, (last time I wrote a pre-requisite it spread like wildfire, hope it wouldn’t be asking too much for it to happen again 🙃 )&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You know about react, have some experience using it.&lt;/li&gt;
&lt;li&gt;You’ve heard of redux&lt;/li&gt;
&lt;li&gt;You are familiar with the react router.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you got this down?, then you are good to roll.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Problem
&lt;/h1&gt;

&lt;p&gt;The problem entails navigating between pages using the react-router library, while also keeping track of authentication status, There's already a common understanding of this problem with respect to authentication and navigation, and usually it's known that you can solve this with a simple setup of react router and redux, But there are many patterns to this very setup, in this article, I’m going to explain mine.&lt;/p&gt;

&lt;h1&gt;
  
  
  The Solution
&lt;/h1&gt;

&lt;p&gt;In order to navigate properly in the app, I set up with react-router and implement a 3 component auth check flow, one component checks for the visitors only pages, another component checks for the protected routes, and the third component encompasses all and does a general check for the application’s auth status, I know it sounds ambiguous now, but we are going to review the code struct and get into the nitty-gritty of things.&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="c1"&gt;// import scenes here and make routes of them&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Route&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;react-router-dom&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// import scenes here&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Dashboard&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Settings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Login&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;./Scenes&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

    &lt;span class="c1"&gt;// auth checkers for checking if the routes are authorized&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;AppCheck&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;./Modules/AppCheck.jsx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;EnsureLoggedInContainer&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;./Modules/EnsureLoggedInContainer.jsx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;EnsureVisitorOnlyContainer&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;./Modules/EnsureVisitorOnlyContainer.jsx&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Fragment&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;AppCheck&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;EnsureVisitorOnlyContainer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Route&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/login&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Login&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/EnsureVisitorOnlyContainer&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;EnsureLoggedInContainer&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
                            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Route&lt;/span&gt; &lt;span class="nx"&gt;exact&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/home&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Dashboard&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;Route&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/settings&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="nx"&gt;component&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;Settings&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;                    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/EnsureLoggedInContainer&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;            &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/AppCheck&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/React.Fragment&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;routes&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This was drawn directly from the codebase, as you can see, the idea is clearly presented.&lt;/p&gt;

&lt;p&gt;The three components in this case are &lt;code&gt;AppCheck&lt;/code&gt;, &lt;code&gt;EnsureVisitorOnlyContainer&lt;/code&gt;, &lt;code&gt;EnsureLoggedInContainer&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Let’s have a look at the inner structure of these components.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AppCheck Component.&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;connect&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;react-redux&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;withRouter&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;react-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;AppCheck&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

      &lt;span class="nx"&gt;componentDidUpdate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;prevProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;redirectUrl&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&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;isLoggingOut&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;prevProps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&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;isLoggingIn&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;prevProps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isLoggingIn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="c1"&gt;// dispatch(navigateTo(redirectUrl))&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isLoggingOut&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;// do any kind of cleanup or post-logout redirection here&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;mapStateToProps&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;redirectUrl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;redirectUrl&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;withRouter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mapStateToProps&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="nx"&gt;AppCheck&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;As we can see, this component checks the prop on update and confirms the state of the previous &lt;code&gt;isLoggedIn&lt;/code&gt; status, to note if a user is logging in or logging out, depending on this, it redirects to another url specified in the redux setup, or it proceeds to logout if it's trying to log out, else it continues with the rendering of the props children.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EnsureVisitorsOnlyContainer&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;connect&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;react-redux&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;withRouter&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;react-router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// import actions from "../Store/Actions";&lt;/span&gt;

    &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;EnsureVisitorOnlyContainer&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

      &lt;span class="nx"&gt;componentDidMount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;currentURL&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;visitorRoutes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;terms&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;conditions&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
        &lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;check&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;visitorRoutes&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;indexOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;currentURL&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

          &lt;span class="c1"&gt;// set the current url/path for future redirection (we use a Redux action)&lt;/span&gt;
          &lt;span class="c1"&gt;// then redirect (we use a React Router method)&lt;/span&gt;
          &lt;span class="c1"&gt;//   dispatch(actions.setRedirectUrl(currentURL))&lt;/span&gt;
          &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;check&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/home&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;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// Grab a reference to the current URL. If this is a web app and you are&lt;/span&gt;
    &lt;span class="c1"&gt;// using React Router, you can use `ownProps` to find the URL. Other&lt;/span&gt;
    &lt;span class="c1"&gt;// platforms (Native) or routing libraries have similar ways to find&lt;/span&gt;
    &lt;span class="c1"&gt;// the current position in the app.&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;mapStateToProps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ownProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ownProps&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;currentURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ownProps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pathname&lt;/span&gt;
      &lt;span class="p"&gt;};&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;withRouter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mapStateToProps&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="nx"&gt;EnsureVisitorOnlyContainer&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;This component set simply checks if the current route is amongst the visitors routes, if it is, then it checks the logged in status, if the app is logged in, it redirects the user to the &lt;code&gt;/home&lt;/code&gt; route. &lt;/p&gt;

&lt;p&gt;Any route listed in this component set would be redirected to the Home route if their path is found in the visitors list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EnsureLoggedInContainer&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;React&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;react&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;connect&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;react-redux&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;withRouter&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;react-router&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
    &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;actions&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;../Store/Actions&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

    &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;EnsureLoggedInContainer&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;React&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;Component&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;

      &lt;span class="nx"&gt;componentDidMount&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;currentURL&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="c1"&gt;// set the current url/path for future redirection (we use a Redux action)&lt;/span&gt;
          &lt;span class="c1"&gt;// then redirect (we use a React Router method)&lt;/span&gt;
          &lt;span class="nx"&gt;dispatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;actions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setRedirectUrl&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;currentURL&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
          &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;history&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;/&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;span class="p"&gt;}&lt;/span&gt;

      &lt;span class="nx"&gt;render&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;props&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;children&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
          &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="c1"&gt;// Grab a reference to the current URL. If this is a web app and you are&lt;/span&gt;
    &lt;span class="c1"&gt;// using React Router, you can use `ownProps` to find the URL. Other&lt;/span&gt;
    &lt;span class="c1"&gt;// platforms (Native) or routing libraries have similar ways to find&lt;/span&gt;
    &lt;span class="c1"&gt;// the current position in the app.&lt;/span&gt;

    &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;mapStateToProps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;ownProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ownProps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="na"&gt;isLoggedIn&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;state&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;isAuthenticated&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="na"&gt;currentURL&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;ownProps&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;location&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;pathname&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;withRouter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;mapStateToProps&lt;/span&gt;&lt;span class="p"&gt;)(&lt;/span&gt;&lt;span class="nx"&gt;EnsureLoggedInContainer&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This container checks if the current state of the app is not loggedin, it redirects to the &lt;code&gt;/&lt;/code&gt; path, therefore all pages get to be managed via this structure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AppCheck&lt;/strong&gt; handling the process of logging out when the prevProp changes it's status, while &lt;strong&gt;EnsureVisitorsOnlyContainer&lt;/strong&gt; and &lt;strong&gt;EnsureLoggedInContainer&lt;/strong&gt; handle redirects on different instances depending on the route and within which container it's listed.&lt;/p&gt;

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

&lt;p&gt;I am open to suggestions as to how this can be improved and to hear from you how you achieve yours, over time I hope to share other tricks and techniques I use in development with react and vue and help others learn how you can take huge advantage of the frameworks in building quicker than quick.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
      <category>authentication</category>
    </item>
    <item>
      <title>Understanding nginx (proxying, reverse proxying, load balancing)</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Wed, 23 May 2018 05:05:49 +0000</pubDate>
      <link>https://dev.to/legobox/understanding-nginx-proxying-reverse-proxying-load-balancing-1pjd</link>
      <guid>https://dev.to/legobox/understanding-nginx-proxying-reverse-proxying-load-balancing-1pjd</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;This piece was originally posted on my blog at &lt;a href="https://medium.com/legobox/understanding-nginx-proxying-reverse-proxying-load-balancing-67f182573832" rel="noopener noreferrer"&gt;legobox&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;Many think of Nginx as just a web server, yep it's a web server, and so much more, Nginx is first and foremost a proxy engine, and load balancing server mechanism, which is capable of working as a web server using whichever post-processing interpreter you’d like, be it uWSGI, php-fpm, etc.&lt;/p&gt;

&lt;p&gt;Many of us have heard of nginx, and some of us are looking forward to checking out what it is, in this piece we take a good look at how to use nginx as a load balancer and a general proxy passer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-requiste
&lt;/h2&gt;

&lt;p&gt;Before getting up and running with nginx, it's usually important (but not compulsory) that you meet the following conditions, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You are looking to learn and understand some more DevOps&lt;/li&gt;
&lt;li&gt;You have an understanding of what a web server is in general&lt;/li&gt;
&lt;li&gt;You’ve used a computer before. 😏 &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Got all these down, then you are good to go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Proxying
&lt;/h2&gt;

&lt;p&gt;The first scenario and structure we are going to check out is the concept of proxying. In general, terms, proxying is simply having one server positioned in front of another and have all request to reach the second server through the first server.&lt;/p&gt;

&lt;p&gt;in nginx, this is achieved using the &lt;code&gt;proxy pass&lt;/code&gt; directive.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    // basic proxy pass
    location / {
      proxy_pass http://ourserver2here.com
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With the proxy pass, there are many tricks and these are important to an understanding with respect to setting a proxy pass system, let’s have a look at some of these in the books.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Matching prefixes&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    location /match/here {
      proxy_pass http://ourserver2here.com;
    } 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the above setup, no URI is given at the end of the server in the proxy pass definition. In this case a request such as &lt;strong&gt;/match/here/please&lt;/strong&gt;, This request would be sent to ourserver2here as &lt;a href="https://ourserver2here/match/here/please" rel="noopener noreferrer"&gt;https://ourserver2here/match/here/please&lt;/a&gt;. Pretty convenient right?&lt;/p&gt;

&lt;h2&gt;
  
  
  Reverse Proxying
&lt;/h2&gt;

&lt;p&gt;This is one type of proxying that’s particularly interesting, It's a proxying system were by requests sent to a server (lets call it A) is actually sent to another server (lets call it B) which places in front of the first server (server A) and proceeds to relay the message to A and responds as if it's A is responding.&lt;/p&gt;

&lt;p&gt;Here's a more formal description.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In computer networks, a &lt;strong&gt;reverse proxy&lt;/strong&gt; is a type of &lt;strong&gt;proxy&lt;/strong&gt; server that retrieves resources on behalf of a client from one or more servers. These resources are then returned to the client as if they originated from the Web server itself.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Here’s a virtual description&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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E03B7F3068651149406121A3CCB672B40D6EDF37D962EC28850BABB322302CCA_1527048473974_1200px-Reverse_proxy_h2g2bob.svg.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%2Fd2mxuefqeaa7sj.cloudfront.net%2Fs_E03B7F3068651149406121A3CCB672B40D6EDF37D962EC28850BABB322302CCA_1527048473974_1200px-Reverse_proxy_h2g2bob.svg.png" alt="source - wikipedia - such good people"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With nginx, we could achieve this, and even take it further, ever heard of ngrok, maybe you may have, maybe not, either ways, &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Ngrok is a service that allows you to serve your localhost application via a domain proxy, exposing it via a public URL.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;With the reverse proxy, and setting up a subdomain on your site for such businesses, you can have your own ngrok without the constant change in the domain name and stuff.&lt;/p&gt;

&lt;p&gt;To pull this off, the first part is to setup nginx on your server to proxy connections from your specific subdomain or domain (whichever you find convenient) to a specific port on the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    server {
      listen 80;

      server_name coolsubdomain.mainname.com;

      location / {
        proxy_pass http://127.0.0.1:5000; #in this case we picked the port 5000
      }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;on your computer, assuming our application is served on our localhost port 8000 (it could be any port really) proceeding to use ssh we run a reverse tunnel to the port on the server.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    // run a reverse proxy to your server via ssh
    ssh -R 5000:127.0.0.1:8000 youruser@mainname.com
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This sets up the reverse proxy, therefore any request going to coolsubdomain.mainname.com is actually coming to your localhost machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Load balancing
&lt;/h2&gt;

&lt;p&gt;Load balancing is another problem nginx has been uniquely positioned to solve, it’s built to handle a lot of requests and if we have several servers running our project, we can balance the load between them using upstreams. &lt;/p&gt;

&lt;p&gt;Nginx uses upstreams to balance the load and it has a few algorithms by default which are implored to handle the load balancing mechanism.&lt;/p&gt;

&lt;p&gt;These algorithms are specified by directives and can be noted as follows.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;(round robin)&lt;/strong&gt;: The default load balancing algorithm that is used if no other balancing directives are present. Each server defined in the upstream context is passed requests sequentially in turn.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;least_conn&lt;/strong&gt; : Specifies that new connections should always be given to the backend that has the least number of active connections. This can be especially useful in situations where connections to the backend may persist for some time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;ip_hash&lt;/strong&gt; : This balancing algorithm distributes requests to different servers based on the client's IP address. The first three octets are used as a key to deciding on the server to handle the request. The result is that clients tend to be served by the same server each time, which can assist in session consistency.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;hash&lt;/strong&gt; : This balancing algorithm is mainly used with Memcached proxying. The servers are divided based on the value of an arbitrarily provided hash key. This can be text, variables, or a combination. This is the only balancing method that requires the user to provide data, which is the key that should be used for the hash&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When setting up, for load balancing it may look 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;    # http context
    upstream backend_hosts {
      least_conn;
      server host1.example.com;
      server host2.example.com;
      server host3.example.com;
    }

    # next we set up our server
    server {
      listen 80;
      server_name example.com;
      location /proxy-me {
        proxy_pass http://backend_hosts;
      }
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We could even add weights to a specific host so they handle more connections in general than the rest according to a certain ratio.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    ...
    upstream backend_hosts {
      least_conn;
      server host1.example.com weight=3;
      server host2.example.com;
      server host3.example.com;
    }
    ...

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

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Where are many other things we can achieve using nginx, this is pretty much just the tip of the iceberg. Setting up web servers and proxy servers can usually be a bit of a hassle, but it doesn’t have to.&lt;/p&gt;

&lt;p&gt;In the next post under this category, I’d explore how to get this up and running using, caddy, it's a web server technology which aims to make the process of setting up web servers and proxy engines a whole lot easier. &lt;/p&gt;

</description>
      <category>devops</category>
      <category>showdev</category>
      <category>linux</category>
      <category>learning</category>
    </item>
    <item>
      <title>How to setup an ethereum node</title>
      <dc:creator>Osita Chibuike</dc:creator>
      <pubDate>Mon, 21 May 2018 15:34:37 +0000</pubDate>
      <link>https://dev.to/legobox/how-to-setup-an-ethereum-node-41a7</link>
      <guid>https://dev.to/legobox/how-to-setup-an-ethereum-node-41a7</guid>
      <description>&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%2F5rqvwys0r5hwgy8eb7fr.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%2Fuploads%2Farticles%2F5rqvwys0r5hwgy8eb7fr.jpg" alt="ethereum homestead"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;This article was originally posted on my blog at &lt;a href="https://medium.com/legobox/setting-up-an-ethereum-node-5193a98446e8" rel="noopener noreferrer"&gt;legobox&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What’s an ethereum node
&lt;/h2&gt;

&lt;p&gt;With the advent of Bitcoin, blockchain based technologies have gradually become increasingly popular, enabling developers to build decentralized applications which many today view as the solution to a presumably problematic part of the internet, control over data.&lt;/p&gt;

&lt;p&gt;Ethereum is unique, in that it attempts to use the same solution of the blockchain to allow anyone the ability to public dapps (decentralized apps) and have them being able to connect directly between providers and clients.&lt;/p&gt;

&lt;p&gt;On the ethereum network every client is a node and is a part of the much larger network, therefore in setting up a client, it has to download the entire network's database and transaction readings till date. In this article, we are going to review all there is to the process of setting up an ethereum node on an Ubuntu (Linux) server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pre-requisites
&lt;/h2&gt;

&lt;p&gt;Before jumping into configurations and commands related to setting up a node, It's important to be grounded in a few basics, therefore you should know about the following to a somewhat familiar extent.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The blockchain technology and how it works.&lt;/li&gt;
&lt;li&gt;Managing accounts on the geth clients (thankfully we'll touch on this in the article)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Types of Nodes
&lt;/h2&gt;

&lt;p&gt;There are basically two types of nodes on the network, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lightweight nodes &lt;/li&gt;
&lt;li&gt;Full nodes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The &lt;strong&gt;Lightweight nodes&lt;/strong&gt; are meant to run on machines of lower resources and therefore keep a really shallow copy of the blockchain data, while the &lt;strong&gt;full node&lt;/strong&gt; keeps track of all transactions performed on the network and therefore.&lt;/p&gt;

&lt;p&gt;In our set up we'll review both systems so as to get a concrete understanding of how to go about the process. &lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up a Geth Client (Node)
&lt;/h2&gt;

&lt;p&gt;There are many clients for the ethereum blockchain, but the safest and well documented of them all include &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mist wallet &lt;/li&gt;
&lt;li&gt;Geth wallet
The mist wallet is a GUI (graphic user interface) based client, this enables the user to control the wallet via click and all, one can also develop contracts on the mist wallet.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Setting up a mist wallet
&lt;/h3&gt;

&lt;p&gt;To set up the mist wallet, navigate to the &lt;a href="https://etheruem.org" rel="noopener noreferrer"&gt;etherum home page&lt;/a&gt;, then proceed to the download sections, you'll find the download button via which you can download a new version of the mist wallet.&lt;/p&gt;

&lt;p&gt;This takes some time to setup because it has to download the blockchain's database, on completion of the download, your computer is effectively at that moment a node on the ethereum network.&lt;/p&gt;

&lt;h4&gt;
  
  
  Building Contracts on the mist wallet
&lt;/h4&gt;

&lt;p&gt;Building contract on the mist network or the ethereum network, in general, is done in solidity, it's a strongly typed language featuring some symmetricity between C++ and javascript. on the mist wallet creating a contract is as simple as switching to the deployment section and placing your contract's code there and then proceeding to deploy. you can find a &lt;a href="https://ethereum.org/token" rel="noopener noreferrer"&gt;good example here&lt;/a&gt;.&lt;/p&gt;

&lt;h4&gt;
  
  
  Setting Up a Geth client wallet.
&lt;/h4&gt;

&lt;p&gt;There are different ways in which one can set up a geth client, for the various operating systems there are.&lt;/p&gt;

&lt;h6&gt;
  
  
  Setting up for Windows
&lt;/h6&gt;

&lt;p&gt;Ever heard of the Chocolatey package manager, this provides an easy way to get the required build setup and tools installed. to set up and install chocolatey checkout &lt;a href="https://chocolatey.org" rel="noopener noreferrer"&gt;https://chocolatey.org&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Next, we set up the administrator command prompt and install the build tools we need.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&amp;gt; choco &lt;span class="nb"&gt;install &lt;/span&gt;git
C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&amp;gt; choco &lt;span class="nb"&gt;install &lt;/span&gt;golang
C:&lt;span class="se"&gt;\W&lt;/span&gt;indows&lt;span class="se"&gt;\s&lt;/span&gt;ystem32&amp;gt; choco &lt;span class="nb"&gt;install &lt;/span&gt;mingw
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Installing these packages will setup the path enviroment variable.&lt;/p&gt;

&lt;p&gt;Next, let's ensure Go is installed&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"GOPATH=%USERPROFILE%"&lt;/span&gt;
C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; &lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="s2"&gt;"Path=%USERPROFILE%&lt;/span&gt;&lt;span class="se"&gt;\b&lt;/span&gt;&lt;span class="s2"&gt;in;%Path%"&lt;/span&gt;
C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; setx GOPATH &lt;span class="s2"&gt;"%GOPATH%"&lt;/span&gt;
C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; setx Path &lt;span class="s2"&gt;"%Path%"&lt;/span&gt;
C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; &lt;span class="nb"&gt;mkdir &lt;/span&gt;src&lt;span class="se"&gt;\g&lt;/span&gt;ithub.com&lt;span class="se"&gt;\e&lt;/span&gt;thereum
C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; git clone https://github.com/ethereum/go-ethereum src&lt;span class="se"&gt;\g&lt;/span&gt;ithub.com&lt;span class="se"&gt;\e&lt;/span&gt;thereum&lt;span class="se"&gt;\g&lt;/span&gt;o-ethereum
C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; &lt;span class="nb"&gt;cd &lt;/span&gt;src&lt;span class="se"&gt;\g&lt;/span&gt;ithub.com&lt;span class="se"&gt;\e&lt;/span&gt;thereum&lt;span class="se"&gt;\g&lt;/span&gt;o-ethereum
C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&amp;gt; go get &lt;span class="nt"&gt;-u&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; golang.org/x/net/context
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Finally, the command to compile geth&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;C:&lt;span class="se"&gt;\U&lt;/span&gt;sers&lt;span class="se"&gt;\x&lt;/span&gt;xx&lt;span class="se"&gt;\s&lt;/span&gt;rc&lt;span class="se"&gt;\g&lt;/span&gt;ithub.com&lt;span class="se"&gt;\e&lt;/span&gt;thereum&lt;span class="se"&gt;\g&lt;/span&gt;o-ethereum&amp;gt; go &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-v&lt;/span&gt; ./cmd/...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With all setup, we are good to work with the setup on windows.&lt;/p&gt;

&lt;h6&gt;
  
  
  Setting up on Linux (Debian)
&lt;/h6&gt;

&lt;p&gt;&lt;strong&gt;Installing from ppa&lt;/strong&gt;&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;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;software-properties-common
&lt;span class="nb"&gt;sudo &lt;/span&gt;add-apt-repository &lt;span class="nt"&gt;-y&lt;/span&gt; ppa:ethereum/ethereum
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install &lt;/span&gt;ethereum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to stay on the bleeding edge of things, install the &lt;code&gt;ethereum-unstable&lt;/code&gt; package instead. After installing, run &lt;code&gt;geth account new&lt;/code&gt; to create an account on your node. You should now be able to run &lt;code&gt;geth&lt;/code&gt; and connect to the network.&lt;/p&gt;

&lt;p&gt;There are also other options such as building from source&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;building from source&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Build Geth ( command line client )&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clone the repository to a directory of your choosing
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/ethereum/go-ethereum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install the latest version of Go (v1.7) If you don't have it already&lt;/li&gt;
&lt;li&gt;Building &lt;code&gt;geth&lt;/code&gt; required Go and C compilers to be installed.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; build-essential golang
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;proceed to build using the following command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;go-ethereum
make geth
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;To start the node, run &lt;code&gt;build/bin/geth&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h6&gt;
  
  
  Setting up on Mac
&lt;/h6&gt;

&lt;p&gt;The easiest way to get started with go-ethereum is to run homebrew. to install homebrew &lt;a href="http://brew.sh/" rel="noopener noreferrer"&gt;check out this&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next, add the tap and install geth&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;brew tap ethereum/ethereum
brew &lt;span class="nb"&gt;install &lt;/span&gt;ethereum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Managing accounts
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;always make sure to remember your password&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;On the geth, client account management is provided via the account command&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="nv"&gt;$ &lt;/span&gt;geth account &amp;lt;&lt;span class="nb"&gt;command&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;options...] &lt;span class="o"&gt;[&lt;/span&gt;arguments...]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This lets you create new accounts, list existing accounts, import private key into a new account, migrating to new key format and changing the password.&lt;/p&gt;

&lt;p&gt;We are going to review a few important commands to know.&lt;br&gt;
&lt;strong&gt;creating accounts&lt;/strong&gt;&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="nv"&gt;$ &lt;/span&gt;geth account new
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase:
Repeat Passphrase:
Address: &lt;span class="o"&gt;{&lt;/span&gt;168sdunina2ee09042d83d7c5811b5334789349934&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Listing accounts&lt;/strong&gt;&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="nv"&gt;$ &lt;/span&gt;geth account list
Account &lt;span class="c"&gt;#0: {5afdd78bdacb56ab1dad28741ea2a0e47fe41331} keystore:///tmp/mykeystore/UTC--2017-04-28T08-46-27.437847599Z--5afdd78bdacb56ab1dad28741ea2a0e47fe41331&lt;/span&gt;
Account &lt;span class="c"&gt;#1: {9acb9ff906641a434803efb474c96a837756287f} keystore:///tmp/mykeystore/UTC--2017-04-28T08-46-52.180688336Z--9acb9ff906641a434803efb474c96a837756287f&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Import private key into a node with custom datadir&lt;/strong&gt;&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="nv"&gt;$ &lt;/span&gt;geth account import &lt;span class="nt"&gt;--datadir&lt;/span&gt; /someOtherEthDataDir ./key.prv
The new account will be encrypted with a passphrase.
Please enter a passphrase now.
Passphrase:
Repeat Passphrase:
Address: &lt;span class="o"&gt;{&lt;/span&gt;7f444580bfef4384839403049823453c9d&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Blockchain technology is still relatively new to many and there's a lot going on in that field, but getting started shouldn't have to be a problem with respect to building dapps and working with decentralized setups. In subsequent writings under this technology, I'd get into the nitty-gritty of solidity and how to go about building and deploying smart contracts.&lt;/p&gt;

</description>
      <category>blockchain</category>
      <category>softwaredevelopment</category>
    </item>
  </channel>
</rss>
