<?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: Martins Ngene</title>
    <description>The latest articles on DEV Community by Martins Ngene (@martins_ngene).</description>
    <link>https://dev.to/martins_ngene</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F643756%2F703f5394-34b5-4e50-8df9-954ee196cc56.png</url>
      <title>DEV Community: Martins Ngene</title>
      <link>https://dev.to/martins_ngene</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/martins_ngene"/>
    <language>en</language>
    <item>
      <title>Getting Started With Express JS: A Beginner's Guide</title>
      <dc:creator>Martins Ngene</dc:creator>
      <pubDate>Wed, 03 Jan 2024 19:59:59 +0000</pubDate>
      <link>https://dev.to/martins_ngene/getting-started-with-express-js-a-beginners-guide-39oi</link>
      <guid>https://dev.to/martins_ngene/getting-started-with-express-js-a-beginners-guide-39oi</guid>
      <description>&lt;p&gt;There are so many JavaScript libraries and frameworks that are used for building APIs and servers but Express JS remains one of the best choices, especially for small or medium-scale projects.&lt;/p&gt;

&lt;p&gt;Currently, express has a weekly download of over 11 million as shown in the &lt;a href="https://www.npmjs.com/package/express" rel="noopener noreferrer"&gt;NPM registry&lt;/a&gt; which shows that it's neither dying nor going away anytime soon.&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;That said, we'll look at how to get an express server up and running in the least possible time. we will follow a simple project-based approach for which I have set up a repository which you can find &lt;a href="https://github.com/Martinsngene/getting_started_with_express" rel="noopener noreferrer"&gt;here&lt;/a&gt;. I have included all of the code for the mini-project which you can find in this article.&lt;/p&gt;

&lt;p&gt;We'll build a simple survey form with HTML and style our form with the CSS which we will serve as a static asset.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fno4w88ha6z46ayupl6s7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fno4w88ha6z46ayupl6s7.png" alt="Mini Project: Survey Form" width="800" height="438"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Setup
&lt;/h2&gt;

&lt;p&gt;To create a new project, open your terminal and create a folder. The name of the folder should be the name you want to give the project. Then cd into the folder and initialize a new npm project (Make sure you have Node js installed). The steps are below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Step 1
mkdir myExpressServer

// Step 2
cd myExpressServer

// Step 3
npm init -y
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Installing Dependencies
&lt;/h2&gt;

&lt;p&gt;We will need a couple of packages for the project so use the command below to install them:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm install express nodemon cors dotenv body-parser&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Dependencies are libraries that give you some utilities and out-of-the-box tools so you don't have to code everything from scratch.&lt;/p&gt;

&lt;p&gt;Open the project in your code editor of choice and you will find a file named package.json it should look like this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fvwj7sethw6d0zrkn3woh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fvwj7sethw6d0zrkn3woh.png" alt="Package.json File" width="620" height="543"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now to structure our project we have to create some files and folders. Use the command below to create them in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Step 1
mkdir public 

// Step 2
touch .env .gitignore index.js public/index.html public/style.css
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open the .gitignore file and add the following names:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;node_modules
.env
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This prevents the files from being tracked by Git. The .env file is used to add secrets like passwords and API keys to our project; we don't want that on GitHub for everyone to see. While the 'node_modules' folder will take too much space if tracked by git. It may cause a slowdown when pushing to GitHub and it can be added with just a command when the repository is cloned using &lt;code&gt;npm install&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Set Up
&lt;/h2&gt;

&lt;p&gt;Now open the index.js file and add this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;require("dotenv").config();
const cors = require("cors");
const express = require("express");
const app = express();
const PORT = 3001;
const bodyParser = require("body-parser");

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

&lt;/div&gt;



&lt;p&gt;The first line configures our app to use the .env file so we can access stored secrets. The second line imports the 'cors' library we installed earlier on. This library enables other applications (like a frontend app) to call the routes that we're about to create. The third line imports our express app and the fourth line instantiates it assigning it to a variable named 'app'. As we are about to see PORT is simply a variable that saves the port number where our app will listen. The last line imports the body-parser package which you'll soon see its use.&lt;/p&gt;

&lt;p&gt;For us to use Nodemon (which helps us watch for changes in our app and reloads the app automatically), add this code to the scripts properties in your package.json file:&lt;br&gt;
&lt;code&gt;"start": "nodemon index.js 3001"&lt;/code&gt;&lt;br&gt;
The result should be this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Ff4ysshh50tzec10uhpxc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Ff4ysshh50tzec10uhpxc.png" alt="Add start scripts to package.json file" width="640" height="595"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then call the listening method on your app and pass the PORT variable as a parameter:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.listen(PORT, () =&amp;gt; {
  console.log("Server is running on PORT " + PORT);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;console.log&lt;/code&gt; is just for us to be sure that the server runs as expected.&lt;/p&gt;

&lt;p&gt;Now on our terminal, we can start our project with:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;npm run start&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Our app will start on the port specified in the package.json file (which is port 3001. You can change this if you prefer another port)&lt;/p&gt;

&lt;p&gt;Add this route to check if your setup is working and visit &lt;code&gt;http://localhost:3001/&lt;/code&gt; on a browser:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.get("/", (req, res)=&amp;gt;{
res.send("Hello World")
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you see "Hello World", then you did it correctly. Congratulations! 🥳 You just built an express server.&lt;/p&gt;

&lt;p&gt;Delete the code below before you start building your app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.get("/", (req, res)=&amp;gt;{
res.send("Hello World")
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Building the App
&lt;/h2&gt;

&lt;p&gt;So building our app, we will first set our static assets, and then we'll learn how to serve them. Open your index.html file in the public folder and add this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html lang="en"&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;meta charset="UTF-8" /&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1.0" /&amp;gt;
    &amp;lt;link rel="stylesheet" href="/public/style.css" /&amp;gt;
    &amp;lt;title&amp;gt;Codeland&amp;lt;/title&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
    &amp;lt;div class="container"&amp;gt;
      &amp;lt;h1&amp;gt;Welcome to Codeland Survey&amp;lt;/h1&amp;gt;
      &amp;lt;form action="/survey" method="post"&amp;gt;
        &amp;lt;!-- Name --&amp;gt;
        &amp;lt;label&amp;gt;Name:&amp;lt;/label&amp;gt;
        &amp;lt;input
          type="text"
          name="name"
          placeholder="Enter your name"
          required /&amp;gt;&amp;lt;br /&amp;gt;

        &amp;lt;!-- Email --&amp;gt;
        &amp;lt;label&amp;gt;Email:&amp;lt;/label&amp;gt;
        &amp;lt;input
          type="text"
          name="email"
          placeholder="Enter your email"
          required /&amp;gt;&amp;lt;br /&amp;gt;

        &amp;lt;!-- Suggestions --&amp;gt;
        &amp;lt;label&amp;gt;How can we improve our services?&amp;lt;/label&amp;gt;&amp;lt;br /&amp;gt;
        &amp;lt;textarea
          placeholder="Enter your suggestions here"
          name="feedback"
          id=""
          cols="30"
          rows="8"
          required&amp;gt;&amp;lt;/textarea
        &amp;gt;&amp;lt;br /&amp;gt;

        &amp;lt;!-- Submit --&amp;gt;
        &amp;lt;input type="submit" value="Submit" /&amp;gt;
      &amp;lt;/form&amp;gt;
    &amp;lt;/div&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

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

&lt;/div&gt;



&lt;p&gt;Then open your style.css file from the same folder and add this code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
* {
  margin: 0;
  padding: 0;
  border: 0;
}

body {
  box-sizing: border-box;
  background-color: #a9d6e5;
}

.container {
  background: transparent;
  width: 80%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-items: center;
  align-items: center;
  padding: 50px 0px;
}

form {
  background-color: #61a5c2;
  width: 50%;
  padding: 20px;
  border-radius: 5px;
}

input,
textarea {
  width: 100%;
  margin-top: 5px;
  margin-bottom: 15px;
  font-size: 16px;
  font-weight: 600;
  padding: 10px 3px;
  outline: none;
}

h1 {
  margin-bottom: 10px;
  font-size: 40px;
}

label {
  font-size: 18px;
  font-weight: 700;
}

@media (max-width: 600px) {
  form {
    width: 80%;
  }
}

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

&lt;/div&gt;



&lt;p&gt;Now we have our assets ready and can start building up the routes while learning some introductory concepts in Express JS.&lt;/p&gt;

&lt;p&gt;Create a &lt;code&gt;.env&lt;/code&gt; file in the root directory of your project and add this code:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;// To access my credentials from .env file&lt;br&gt;
const originUrl = process.env.ORIGIN_URL;&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
The next step is to configure our &lt;code&gt;cors&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// To allow only a particular origin to access your server, create an object like the one below
// Then add it to the route you want to allow the origin to access
// or pass as an argument to the cors() if you want that origin to have access to all the routes on your server
let corsOptions = {
  origin: originUrl,
  optionsSuccessStatus: 200, // some legacy browsers (IE11, various SmartTVs) choke on 204
};

// To enable cross-origin resource sharing
app.use(cors());

// Body Parser is required to parse payloads coming from the front end.
// Without this, you'll get an error "TypeError: Cannot read properties of undefined (reading 'name')"
// Because the payload won't be parsed.
app.use(bodyParser.urlencoded({ extended: false }));
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What Is CORS And Why Is It Important?
&lt;/h2&gt;

&lt;p&gt;CORS stands for Cross-Origin Resource Sharing. This is a mechanism that web applications use to communicate and share resources. For example, for a frontend application to communicate with our server via network requests, we need to tell our server to receive messages from the frontend app.&lt;/p&gt;

&lt;p&gt;This helps guard our server against malicious attacks of hackers sending attacks from another origin or web application. If the origin URL of the hackers' web application is not registered on our server, our server will refuse to communicate with it thus mitigating the attack. To learn more about &lt;code&gt;cors&lt;/code&gt; you can see the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS" rel="noopener noreferrer"&gt;Mozilla Developers Network - MDN &lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Serving Static Assets
&lt;/h2&gt;

&lt;p&gt;For us to work with our form, we need to see it in our browser. For this to happen, we have to expose the assets in our application so that they can be accessed from the port. Add the code below after the previous codes:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;// Serve static assets from the public folder&lt;br&gt;
app.use("/public", express.static(__dirname + "/public"));&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;The above line of code exposes the assets of our file but we still need to serve our HTML form on a particular route so we can see it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Serve a HTML file
const serveHTML = __dirname + "/public/index.html";

app.get("/", (req, res) =&amp;gt; {
  res.sendFile(serveHTML);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code exposes our form on the home route. Visit &lt;code&gt;http://localhost:3001/&lt;/code&gt; on a browser to view it.&lt;/p&gt;

&lt;p&gt;You will find that the form has two inputs and one textbox. The next question is how do we get the data from the form on our server when a user fills it?&lt;/p&gt;

&lt;p&gt;We will create an endpoint for that. First, notice the opening tag of the form element in your &lt;code&gt;index.html&lt;/code&gt; file:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;lt;form action="/survey" method="post"&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can see the &lt;code&gt;action&lt;/code&gt; attribute already has an endpoint &lt;code&gt;/survey&lt;/code&gt;. Let's create that endpoint. Add the code below after the previous ones:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This endpoint returns a JSON object containing the details entered in the survey form
app.post("/survey", (req, res) =&amp;gt; {
  const details = {
    name: req.body.name,
    email: req.body.email,
    feedback: req.body.feedback,
  };
  res.json(details);
});

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

&lt;/div&gt;



&lt;p&gt;No need to freak out. Let me explain 🤓 On the app variable, we call a &lt;code&gt;post&lt;/code&gt; method which takes in two parameters. The first is the endpoint, the second is a function to perform the tasks and communication associated with that endpoint.&lt;/p&gt;

&lt;p&gt;You can see that we've named the endpoint to which we can send the form's data. Let's see what the function does. In simple terms, the &lt;code&gt;req&lt;/code&gt; argument the function accepts stands for &lt;code&gt;request&lt;/code&gt;. It's an object that any application allowed by the server uses to talk to a route on the server while the &lt;code&gt;res&lt;/code&gt; argument stands for &lt;code&gt;response&lt;/code&gt; and it's an object that the server uses to respond to the requests of the application.&lt;/p&gt;

&lt;p&gt;That said, we can see that the &lt;code&gt;req&lt;/code&gt; object contains another object as its property named &lt;code&gt;body&lt;/code&gt; which contains the data of our form. We then save it into an object &lt;code&gt;details&lt;/code&gt; and convert that object to JSON format then the server sends it as a response: &lt;code&gt;res.json(details);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now fill out the form and submit it. You will see that the data is returned as a JSON object.&lt;/p&gt;

&lt;h2&gt;
  
  
  Some More Details About The &lt;code&gt;req&lt;/code&gt; object
&lt;/h2&gt;

&lt;p&gt;Let's see some other information contained in the &lt;code&gt;req&lt;/code&gt; object aside from the &lt;code&gt;body&lt;/code&gt;. Add the code below after the previous codes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This endpoint shows some information about the machine of the user making a request to your server
app.get("/info", (req, res) =&amp;gt; {
  const response = {
    ip: req.ip,
    path: req.path,
    method: req.method,
    message: "These are some info you can get from the request object",
  };
  res.json(response);
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now visit the endpoint: &lt;code&gt;http://localhost:3001/info&lt;/code&gt;  and you'll get a response of an object with the &lt;code&gt;ip&lt;/code&gt; and &lt;code&gt;path&lt;/code&gt; of the route you visited. And a message property.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sending Params To The Server Via Endpoints
&lt;/h2&gt;

&lt;p&gt;Lastly, we will consider how to send parameters from the front end of our application to a route on our server to be used to perform a taste. Paste the code below after the previous codes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// This endpoint shows how to get the params sent from the client side on the server
// To test the endpoint, visit the route attaching your localhost port.
// Then add a number of day of the week and it gets returned as a JSON object
// E.g localhost:3001/weekdays/1
app.get("/weekdays/:day", (req, res) =&amp;gt; {
  const weekDays = [
    "Sunday",
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday",
  ];
  let day = req.params.day;
  res.json({
    dayOfWeek:
      day &amp;gt; 7
        ? "No such day of the week. There are only 7 days in the week"
        : weekDays[day - 1],
  });
});
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In the code above, notice how this endpoint is written:&lt;br&gt;
&lt;code&gt;/weekdays/:day&lt;/code&gt;. &lt;code&gt;:day&lt;/code&gt; is the variable that is sent to the server as a parameter. &lt;code&gt;:&lt;/code&gt; must be included to show it's a parameter the &lt;code&gt;day&lt;/code&gt; can be given any name as you see fit.&lt;/p&gt;

&lt;p&gt;We can access this parameter on the server from the &lt;code&gt;req&lt;/code&gt; object. We find the &lt;code&gt;params&lt;/code&gt; object and we get the &lt;code&gt;day&lt;/code&gt; variable from it. Now visit this URL to test the endpoint: &lt;code&gt;http://localhost:3001/weekdays/1&lt;/code&gt;. Change the number from 1 to 7 to get the names of different days of the week. A number outside this range will give you a message: &lt;code&gt;No such day of the week. There are only 7 days in the week&lt;/code&gt; as a safeguard for higher figures.&lt;/p&gt;

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

&lt;p&gt;Get the complete code on &lt;a href="https://github.com/Martinsngene/getting_started_with_express" rel="noopener noreferrer"&gt;Github&lt;/a&gt; and don't forget to drop a star to support me 🤓&lt;/p&gt;

&lt;p&gt;And there you go. A guide to get you started with Express JS. Of course, there are more things to learn about the framework but the things covered here will give you a great head start to using Express Js for building APIs.&lt;/p&gt;

&lt;p&gt;I am Martins Ngene, A Software Developer and Technical Writer. Follow me for more content like this. Let's connect on &lt;a href="https://www.linkedin.com/in/martins-ngene/" rel="noopener noreferrer"&gt;Linkedin&lt;/a&gt; and  &lt;a href="https://twitter.com/martins_ngene" rel="noopener noreferrer"&gt;X - formerly Twitter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you have any questions or contributions please drop a comment below. Thank you.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>mern</category>
      <category>express</category>
    </item>
    <item>
      <title>How To Organise Your Tailwind CSS Classes in Next js</title>
      <dc:creator>Martins Ngene</dc:creator>
      <pubDate>Wed, 09 Aug 2023 10:02:21 +0000</pubDate>
      <link>https://dev.to/martins_ngene/how-to-organise-your-tailwind-css-classes-in-next-js-4314</link>
      <guid>https://dev.to/martins_ngene/how-to-organise-your-tailwind-css-classes-in-next-js-4314</guid>
      <description>&lt;p&gt;When building projects with Nextjs and Tailwind CSS your components can look rough and untidy 🥲. This is because Tailwind CSS is a utility-first framework whose superpowers include utility classes for almost anything you want to achieve with CSS.&lt;/p&gt;

&lt;p&gt;In this article, I'll quickly show you how to set up a simple folder structure to neatly organize your Tailwind CSS classes when working with Nextjs or React 👨‍💻.&lt;/p&gt;

&lt;p&gt;I'm Martins Ngene, A Software Engineer 🙂 and my goal is to share as much knowledge as I can to assist you in your daily workflow and learning 🚀.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up A Tailwind CSS + Nextjs Project
&lt;/h2&gt;

&lt;p&gt;Setting up a Tailwind CSS + Nextjs project has never been easier until Nextjs 13. Follow the &lt;a href="https://nextjs.org/docs/getting-started/installation" rel="noopener noreferrer"&gt;installation guide here&lt;/a&gt; to get started.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Component Case Study
&lt;/h2&gt;

&lt;p&gt;Using a &lt;code&gt;NavBar&lt;/code&gt; component as a case study below is what it looks like to build a component with Tailwind CSS:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fuixg31svsa0ahk4k21cr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fuixg31svsa0ahk4k21cr.png" alt="A NavBar Component Built With Tailwind CSS" width="800" height="773"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Organising The Tailwind CSS Classes
&lt;/h2&gt;

&lt;p&gt;To organize the classes in the above component, we have to create a file with the extension &lt;code&gt;.module.css&lt;/code&gt;. You can name the file whatever you want to but the name should end with a &lt;code&gt;.module.css&lt;/code&gt;. This file can be stored in another folder in your project but I'd recommend you store it in the same folder as your component. Below is a picture of the folder structure:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fbmbgq9yfyn3ue5pc5xg9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fbmbgq9yfyn3ue5pc5xg9.png" alt="Component File Structure" width="800" height="290"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above image, you can see that my component is created in a folder called 'navbar' in the &lt;code&gt;index.tsx&lt;/code&gt; file and you can see my CSS module file named &lt;code&gt;styles.module.css&lt;/code&gt;. In the &lt;code&gt;styles.module.css&lt;/code&gt; I'll copy and paste my utility classes as a group and give them a name according to the sections of the component I made before. so my CSS module will look like the picture below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fiy689nia8bpnoixp20hm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fiy689nia8bpnoixp20hm.png" alt="CSS Module File" width="800" height="439"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Notice that the convention is similar to writing regular CSS styles but there are a couple of things to note. First, after declaring your class name, you have to use the &lt;code&gt;@apply&lt;/code&gt; before adding your tailwind CSS classes. Also, be sure to end the class names with a semicolon. After adding a semicolon at the end of the classes, you can add regular CSS if you want to and it will work just fine. You can also configure Prettier to automatically add the semicolons for you when you save the file. Checkout the code below to see how to add regular CSS to your tailwind CSS classes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.container {
  @apply mx-auto lg:mx-0 w-[80%] lg:w-full h-[100vh];
  display: flex;
  align-items: center;
  justify-content: center;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now that we have separated our tailwind classes, we can import our module to our component:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2Fno5hx8v960koz6nkueoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2Fno5hx8v960koz6nkueoj.png" alt="Organised Tailwind CSS Component" width="800" height="726"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Import the keyword &lt;code&gt;styles&lt;/code&gt; from your CSS module (&lt;code&gt;styles.module.css&lt;/code&gt;), then add the class names to the respective sections on your component by using the dot notation on the &lt;code&gt;styles&lt;/code&gt; object you imported from the CSS module. For example, if you have a class named &lt;code&gt;container&lt;/code&gt; in your CSS module, go to the className attribute on the element you want to add it and reference it from the styles object:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div className={styles.container}&amp;gt; Hello World &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you followed through, you should see your styles apply to your webpage. But if you have any issues or suggestions, drop them in the comment section below, and let's discuss 😎&lt;/p&gt;

&lt;p&gt;I hope this article helped you in one way or another. Follow me for more articles on web development and software engineering. I’m also available to connect on &lt;a href="https://www.linkedin.com/in/martins-ngene/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>javascript</category>
      <category>nextjs</category>
      <category>tailwindcss</category>
    </item>
    <item>
      <title>How To Open A File or Folder ( to GUI ) From The Terminal in Ubuntu</title>
      <dc:creator>Martins Ngene</dc:creator>
      <pubDate>Mon, 24 Jul 2023 12:25:54 +0000</pubDate>
      <link>https://dev.to/martins_ngene/how-to-open-a-file-or-folder-to-gui-from-the-terminal-in-ubuntu-95g</link>
      <guid>https://dev.to/martins_ngene/how-to-open-a-file-or-folder-to-gui-from-the-terminal-in-ubuntu-95g</guid>
      <description>&lt;p&gt;While you can use the &lt;code&gt;cd&lt;/code&gt; command to navigate into folders and files, sometimes you may want to view the content of a file or a folder graphically without going through the hassle 😤 of using your GUI tools. &lt;/p&gt;

&lt;p&gt;Today I will show you how to do that 😎. Hi, I'm Martins Ngene, A Software Engineer. I'm happy to bring you this information 🤓&lt;/p&gt;

&lt;p&gt;So, getting started I presume you are at the home directoy in your terminal. Let's say &lt;code&gt;johndoe@johndoe-HP-EliteBook-8460xx:~$&lt;/code&gt; and you want to take a look at the package.json file of a project deeply nested in your projects folder located in your Desktop folder &lt;code&gt;~/Desktop/projects/blog/package.json&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;All you need to do is use the &lt;code&gt;xdg-open&lt;/code&gt; command which is installed by default in Ubuntu 22.04. You can also use it in Ubuntu 18.04, 20.04 or install it if its not available using &lt;br&gt;
&lt;code&gt;sudo apt-get install xdg-utils&lt;/code&gt;. If you encounter any issues  maybe you use a different distro, you can refer to &lt;a href="https://unix.stackexchange.com/questions/101378/xdg-open-is-installed-yet-also-is-not-installed" rel="noopener noreferrer"&gt;this Stack exchange post.&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Using the &lt;code&gt;xdg-open&lt;/code&gt; command
&lt;/h2&gt;

&lt;p&gt;To use the command simply type the code below in your terminal and adjust path url to the file/folder you wish to open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;johndoe@johndoe-HP-EliteBook-8460xx:~$ xdg-open ~/Desktop/projects/blog/package.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This opens the package.json file in your default text editor.&lt;/p&gt;

&lt;p&gt;To open a folder:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;johndoe@johndoe-HP-EliteBook-8460xx:~$ xdg-open ~/Desktop/projects/blog
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This opens the blog folder with your default file manager.&lt;/p&gt;

&lt;h2&gt;
  
  
  An Alternative
&lt;/h2&gt;

&lt;p&gt;Maybe for some reason the above tool doesn't work for your distro, you can always use an alternative.&lt;/p&gt;

&lt;p&gt;The command below will perform the same operation:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gnome-open ~/Desktop/projects/blog&lt;/code&gt; or&lt;br&gt;
&lt;code&gt;gio-open ~/Desktop/projects/blog&lt;/code&gt; if you use a more recent &lt;br&gt;
version of ubuntu.&lt;/p&gt;

&lt;p&gt;You can download this tool using &lt;code&gt;sudo apt-get install libgnome2-0&lt;/code&gt; in your terminal.&lt;/p&gt;

&lt;p&gt;I hope this helps you and feel free to share your thoughts and/or contributions in the comment section 🤗&lt;/p&gt;

&lt;p&gt;We can connect on &lt;a href="https://www.linkedin.com/in/martins-ngene/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;. Follow me here for more contents on proramming and software engineering.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>ubuntu</category>
      <category>programming</category>
      <category>softwareengineering</category>
    </item>
    <item>
      <title>How To Work With The Vi Editor In Linux</title>
      <dc:creator>Martins Ngene</dc:creator>
      <pubDate>Wed, 09 Mar 2022 17:58:20 +0000</pubDate>
      <link>https://dev.to/martins_ngene/how-to-work-with-the-vi-editor-in-linux-3lmf</link>
      <guid>https://dev.to/martins_ngene/how-to-work-with-the-vi-editor-in-linux-3lmf</guid>
      <description>&lt;p&gt;Most Unix Based Operating Systems has an editor which it is built with. It is very useful for editing text files, building shell scripts and other things which is required of a text editor.&lt;/p&gt;

&lt;p&gt;I am Martins Ngene. I am a Software Engineer, Blogger and Technical Writer. I will give you a little content to help you get started using vi editor.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is vi editor?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This is the default editor that comes with most of the Unix-based operating systems. The name “vi editor” is the short name for visual editor. In 1976 Bill Joy wrote the first code for the vi editor. &lt;/p&gt;

&lt;p&gt;The vi editor is a terminal based editor. It is used to manipulate files directory from the command line. This means you do not have to download it as an application.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;How To Use The Vi Editor&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To use the vi editor, you need to have a Unix-based operating system installed on your machine. You can use git bash if you are on windows or mac.&lt;/p&gt;

&lt;p&gt;To Open A File In Vi:&lt;/p&gt;

&lt;p&gt;To open a file in vi use the command:&lt;br&gt;
&lt;code&gt;vi filename&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To open a file that was open before your computer crashed use the command:&lt;br&gt;
&lt;code&gt;vi -r filename&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F5da4chmstp6etwywsv3j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F5da4chmstp6etwywsv3j.png" alt="Vi Editor" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what the editor looks like, it shouldn't be too different on your machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Modes In Vi Editor&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;There are two main modes on the vi editor. The Command mode and the insert mode.&lt;/p&gt;

&lt;p&gt;Command Mode:&lt;br&gt;
In this mode every character typed is a command which is executed on the text file being edited. When you open the editor it is in the command mode by default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F97d36n5z23ztjgmindzy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F97d36n5z23ztjgmindzy.png" alt="Command Mode on Vi Editor" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Insert Mode:&lt;br&gt;
In this mode, every character entered is added to the text file. To enter this mode click &lt;code&gt;i&lt;/code&gt;. Although some commands entered in the command mode can change the editor to insert mode. Use the  escape key to leave the insert mode back to the command mode.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.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%2F8rzlddky0c7pzmlp98y9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.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%2F8rzlddky0c7pzmlp98y9.png" alt="Insert Mode on Vi Editor" width="800" height="449"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Moving Around With Your Cursor&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;To move your cursor around in vi, use the normal arrow keys to move in their respective directions. To move your cursor with letters, use &lt;code&gt;CTRL + k&lt;/code&gt; to move upwards, &lt;code&gt;CTRL + j&lt;/code&gt; to move downwards. Change the mode to command mode and use “h” to move left and “l” to go right.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Basic Commands In Vi Editor&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Before typing any command on the vi editor, you must first type the “:” colon character. I will list some of the basic commands which you can use to edit a text file on your machine:&lt;br&gt;
 &lt;strong&gt;Inserting Text Into A File:&lt;/strong&gt;&lt;br&gt;
Just as we discussed earlier, we can use &lt;code&gt;i&lt;/code&gt; to enter the insert mode on the vi editor and this enables us type characters into our text files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cutting Text In A Text File:&lt;/strong&gt;&lt;br&gt;
To cut text in the vi editor use the &lt;code&gt;dd&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Pasting Text Into A File:&lt;/strong&gt;&lt;br&gt;
To paste some text or a line of text which you cut from another file or document, use the &lt;code&gt;p&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Undoing An Action:&lt;/strong&gt;&lt;br&gt;
To undo an action in the vi editor use the &lt;code&gt;u&lt;/code&gt; command. This command reverts your action one step backward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To Move Cursor To The Beginning of Your Current Line:&lt;/strong&gt;&lt;br&gt;
To move your cursor to the beginning of the current line you are on, use the number &lt;code&gt;0&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To Exit The Editor:&lt;/strong&gt;&lt;br&gt;
To exit the vi editor, use the &lt;code&gt;q!&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To Move Cursor To The End of Your Current Line:&lt;/strong&gt;&lt;br&gt;
To move your cursor to the end of your current line, use the &lt;code&gt;$&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To Save An Edited File:&lt;/strong&gt;&lt;br&gt;
To save an edited file use the &lt;code&gt;w&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;To Save And Exit A File Simultaneously:&lt;/strong&gt;&lt;br&gt;
To save and exit a file simultaneously, use the &lt;code&gt;wq&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;There you go, a handful of useful commands to get started using the vi editor. You can check out this link: &lt;a href="https://www.cs.colostate.edu/helpdocs/vi.html" rel="noopener noreferrer"&gt;Corolado State University Helpdocs&lt;/a&gt; for more commands in the vi editor.&lt;/p&gt;

&lt;p&gt;Follow me for more useful content to give you precise knowledge about various technologies, tools and software in general.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>visualeditor</category>
      <category>vi</category>
      <category>unixterminal</category>
    </item>
    <item>
      <title>Is Indentation Important ?</title>
      <dc:creator>Martins Ngene</dc:creator>
      <pubDate>Wed, 16 Jun 2021 13:54:17 +0000</pubDate>
      <link>https://dev.to/martins_ngene/is-indentation-important-2ibi</link>
      <guid>https://dev.to/martins_ngene/is-indentation-important-2ibi</guid>
      <description>&lt;p&gt;Some times when we write code we forget to indent our code. Indent simply means to space out the lines and nest the tags and curly braces correctly to show the parent child relationship between the &lt;br&gt;
individuals respectively.&lt;/p&gt;

&lt;p&gt;So to answer the question yes! Indentation is important. Some people may not be able to explain why but they'll tell you that it's important though.&lt;/p&gt;

&lt;p&gt;I'll attempt to explain why Indentation is very important while writing code and I'll suggest possible solution that can help you indent your code easily.&lt;/p&gt;

&lt;p&gt;So one reason I learnt that makes Indentation important is because it improves the readability of your code. If you have worked with a framework like Bootstrap, you'll notice how fast your code grows and if you don't indent your code, it could get a little messy and difficult to debug.&lt;/p&gt;

&lt;p&gt;There may also be a case where you put in some code in an inappropriate container. For example, you may paste in the bootstrap template of a component into a div container you created for something else. I personally have had an issue in my bootstrap grid system because of Indentation. It really frustrated me and I spent a lot of time to figure that out. So you see Indentation can also help you eliminate bugs.&lt;/p&gt;

&lt;p&gt;One more reason you might want to indent your code is because it helps you write more clean code and improves your collaboration with a team as your colleagues will find it easy to read your code. This is an advantage as it will add value to you as a developer.&lt;/p&gt;

&lt;p&gt;A quick solution if you are using Microsoft's Visual Studio Code is to activate the auto indent feature. This indents your code automatically at least to a decent point.&lt;/p&gt;

&lt;p&gt;Also try to indent your code as you write them, don't wait till you finish or you may get lazy once the code works.&lt;/p&gt;

&lt;p&gt;Okay that's what I have to share and I am grateful for the Grace to share this with you all.&lt;/p&gt;

&lt;p&gt;Thank you for reading, please drop a comment about your opinion on this. Don't forget to write more code 😉.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>html</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>My Journey To Full Stack Web Development From My Side Of The World Teaching Myself.</title>
      <dc:creator>Martins Ngene</dc:creator>
      <pubDate>Fri, 04 Jun 2021 23:29:42 +0000</pubDate>
      <link>https://dev.to/martins_ngene/my-journey-to-full-stack-web-development-from-my-side-of-the-world-teaching-myself-8p9</link>
      <guid>https://dev.to/martins_ngene/my-journey-to-full-stack-web-development-from-my-side-of-the-world-teaching-myself-8p9</guid>
      <description>&lt;p&gt;It's been a heck of a journey getting into the Web development Industry.&lt;br&gt;
I'm Martins Ngene from Nigeria. I have come a long way on my journey to become a Full Stack Web Developer. I am going to share with you all what my journey have been like and hopefully we all learn something.&lt;/p&gt;

&lt;p&gt;I have been unstable in my learning of Web Development. I started in 2018 but I took off seriously early this year. I have had a bunch of challenges but what some people call luck and I call Divine assistance has been present. From the issue of power supply shortage down to the unavailability of data this has all been a hinderance. My country is still a developing country and its Ecosystem isn't conducive for newbies in Tech or programming. Majority of the people trying to get into the tech industry In Nigeria are either hindered by the high cost of computers and other gadgets, Data unavailability or Power supply shortage. &lt;/p&gt;

&lt;p&gt;Sometimes we do pray for help to come from distant lands. But I was Graced to have reached the point where I am now though I just started an Introductory course to computer science as at when I wrote this post but I am sure that against all odds I will achieve my goals someday. &lt;/p&gt;

&lt;p&gt;I have acquired some skills such as HTML, CSS, Bootstrap, Git, Netlify, SASS and I still look forward to get my hands dirty with a programming language soon while I practice what I have already learnt.&lt;/p&gt;

&lt;p&gt;I am currently looking for any available way for me to get industrial experience and really get to learn more about coding and programming in general.&lt;/p&gt;

&lt;p&gt;I lost My Dad in 2014 and My Mum in 2020. I really lost the chance of my parents sending me to college but I believe and I know I'll get a job from Web development and I will finally go to my school of choice and study computer science, even getting a better knowledge of programming. &lt;/p&gt;

&lt;p&gt;I see a very bright future in the programming Ecosystem and I believe that someday I will learn enough to fulfill my dreams and also to reduce the stress for people who are interested in Programming by helping them in any possible way.&lt;/p&gt;

&lt;p&gt;Since I started this journey, I have learnt to persist and not to give up. I have also learnt how important it is for you to be diligent and consistent in whatever I do. &lt;/p&gt;

&lt;p&gt;Finally I say a 'Big Thanks' to the Piper behind the flute, to those who has supported me in any way, to Dev community for a Platform like this to share my story with all you wonderful readers and also to everyone reading this post.  &lt;/p&gt;

&lt;p&gt;I hope to update you all when I get to my destination.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>beginners</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
