<?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: Aosu Stephen Terver</title>
    <description>The latest articles on DEV Community by Aosu Stephen Terver (@truetechcode).</description>
    <link>https://dev.to/truetechcode</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%2F80377%2F03ca2363-ac83-4713-af72-87ff25c2c73c.jpg</url>
      <title>DEV Community: Aosu Stephen Terver</title>
      <link>https://dev.to/truetechcode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/truetechcode"/>
    <language>en</language>
    <item>
      <title>😨Is Someone Actually Eavesdropping On Me!😱</title>
      <dc:creator>Aosu Stephen Terver</dc:creator>
      <pubDate>Fri, 24 Mar 2023 22:37:00 +0000</pubDate>
      <link>https://dev.to/truetechcode/is-someone-actually-eavesdropping-on-me-369k</link>
      <guid>https://dev.to/truetechcode/is-someone-actually-eavesdropping-on-me-369k</guid>
      <description>&lt;p&gt;I woke up this morning to discover the message in the banner, it was scary! The message popup while trying to access a GitHub repository from my local machine, (I've not seen something like this before), I actually thought I have been hacked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Background on GitHub's SSH Key Exposure
&lt;/h2&gt;

&lt;p&gt;GitHub is one of the most popular code hosting platforms in the world. Millions of developers use GitHub every day to collaborate on projects, share code, and manage their workflows. Unfortunately, even the most trusted and reliable platforms can sometimes experience security incidents.&lt;/p&gt;

&lt;p&gt;GitHub discovered that its RSA SSH private key was briefly exposed in a public GitHub repository. Although the exposure lasted only a few minutes, it was long enough to potentially compromise the security of the SSH key.&lt;/p&gt;

&lt;h2&gt;
  
  
  Impact of the Exposure on Developers Using GitHub
&lt;/h2&gt;

&lt;p&gt;As a result of the incident, GitHub changed its RSA SSH private key out of an abundance of caution. This change will impact developers who use SSH keys to authenticate with GitHub. If you are one of those developers, you may notice a warning message when you try to connect to GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  Warning Message Displayed by GitHub
&lt;/h2&gt;

&lt;p&gt;The warning message will 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;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
SHA256:uNiVztksCsDhcc0u9e8BujQXVUpKZIDTMczCvj3tD2s.
Please contact your system administrator.
Add correct host key in ~/.ssh/known_hosts to get rid of this message.
Host key for github.com has changed and you have requested strict checking.
Host key verification failed.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This warning message is triggered because the RSA SSH key used to authenticate with GitHub has changed. There are two potential causes for this change: either someone is attempting a man-in-the-middle attack, or GitHub has changed the key for security reasons.&lt;/p&gt;

&lt;h2&gt;
  
  
  Steps to Fix the Issue
&lt;/h2&gt;

&lt;p&gt;If you see the warning message, there are several steps you can take to fix the issue, read more from this &lt;a href="https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/"&gt;post&lt;/a&gt; made by GitHub about the incidence, and what steps to take to protect yourself.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🔥 Changing Your Git Repository From Master To Main 🔥</title>
      <dc:creator>Aosu Stephen Terver</dc:creator>
      <pubDate>Wed, 30 Dec 2020 11:17:30 +0000</pubDate>
      <link>https://dev.to/truetechcode/changing-your-git-repository-from-master-to-main-25mk</link>
      <guid>https://dev.to/truetechcode/changing-your-git-repository-from-master-to-main-25mk</guid>
      <description>&lt;p&gt;It has become imperative for us to remove the master/slave terms from our codes.&lt;/p&gt;

&lt;p&gt;I will be showing you how I did that for my local git repository.&lt;/p&gt;

&lt;p&gt;Simply get into your project directory from the terminal and run the following command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -m master main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For this command to work as expected, make sure you have made some commits on the branch.&lt;/p&gt;

&lt;p&gt;And viola! 💥 that is it. You can now push to your remote.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Start A Career in Tech: 2021 guide</title>
      <dc:creator>Aosu Stephen Terver</dc:creator>
      <pubDate>Sat, 11 Jan 2020 21:20:12 +0000</pubDate>
      <link>https://dev.to/truetechcode/advice-for-those-starting-a-career-in-tech-in-2020-2dn6</link>
      <guid>https://dev.to/truetechcode/advice-for-those-starting-a-career-in-tech-in-2020-2dn6</guid>
      <description>&lt;p&gt;It is 2021 and many are trying to recover from the losses of 2020 as many lost jobs, businesses, or failed in their career.&lt;/p&gt;

&lt;p&gt;While the pandemic lasted and things happened last year it might be surprising to know that many still kept their jobs, got new jobs, or even got a promotion check this article out &lt;a href="https://www.techrepublic.com/article/where-the-jobs-are-tech-hiring-is-on-the-rise/"&gt;Where the jobs are: Tech hiring is on the rise&lt;/a&gt;. As more companies try to navigate the pandemic there has been an increase in the adoption of technology and this has also given rise to more technology jobs which has in turn made remote work more possible.&lt;/p&gt;

&lt;p&gt;In the next few paragraphs, I will be talking about the opportunities that have been made possible by technology and how you can get started with a career in tech:&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the right domain for yourself.
&lt;/h2&gt;

&lt;p&gt;hey! tech is like an ocean, you can easily get lost without a direction, there are so many fields in tech so make sure you do your research and pick a specific domain that suits you and stick to it and know it and be known for it, what do you want to be? A Web developer? Check &lt;a href="https://www.freecodecamp.org/news/2019-web-developer-roadmap/"&gt;The 2020 Web Developer Roadmap – A Visual Guide to Becoming a Front End, Back End, or DevOps Developer&lt;/a&gt; by Quincy Larson and for other tech fields check this article &lt;a href="https://www.freecodecamp.org/news/how-to-choose-the-best-tech-career-path-for-you-61c4d5ff9a77/"&gt;How to choose the best tech career path for you&lt;/a&gt; by Colin Smith and &lt;a href="https://careerfoundry.com/en/blog/career-change/which-tech-career-path-is-right-for-me/"&gt;Which Tech Career Path Is Right For You? A Guide To Four Of The Most Rewarding Jobs In Tech Right Now&lt;/a&gt; by Emily Stevens for the several rewarding career paths in tech. Pick one and invest your limited time in mastering it, as it is said: &lt;code&gt;Code, Eat, Sleep and Repeat&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Set goals and pursue them.
&lt;/h2&gt;

&lt;p&gt;You cannot afford to be random this year, because you failed to hit your goals last year is not an excuse not to try again, you will get lost, having a goal will be a compass to lead you to your destination, be very specific about what you want to achieve and pursue it with your all, let your goals be &lt;code&gt;SMART - Specific, Measurable, Achievable, Realistic, and Timely&lt;/code&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  Be self-motivated.
&lt;/h2&gt;

&lt;p&gt;There is always a limit to the extent to which someone else will be willing to push you into achieving your goals, if you don't push yourself sorry then, because you will be left behind, let the benefits of becoming a developer in whatever domain you choose or the dream of who you want to become in the near future be your motivation, the benefit you may derive from choosing a career in tech may vary depending on your current situation and need, so don’t give up. Check this &lt;a href="https://www.youtube.com/watch?v=_EKDbwoNE20"&gt;video&lt;/a&gt; by Danny Thompson.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose a learning style and method.
&lt;/h2&gt;

&lt;p&gt;There are several styles of learning as there are also learning methods because “everyone learns different ways and has various opportunities to learn.” The style of learning you might eventually choose will be depended on the learning path you have chosen and they include Self-Learning, Coding Boot Camps and College degree. &lt;a href="http://twitter.com/talk2MeGooseman"&gt;talk2MeGooseman&lt;/a&gt; has done a good job highlighting the pros and cons of each and also listing some learning resources if you chose the self-learning path in his article &lt;a href="https://dev.to/talk2megooseman/how-do-i-get-started-coding-pros-cons-advice-to-help-you-55eb"&gt;How Do I Get Started Coding? Pros, Cons &amp;amp; Advice to help you&lt;/a&gt;. I think one of the most effective learning styles, when it comes to learning tech is &lt;strong&gt;Project-based learning&lt;/strong&gt; or &lt;strong&gt;learning by doing&lt;/strong&gt; that is the pattern many tutorials and videos are designed with. Building stuff in your domain is in itself a motivation to keep learning. A &lt;strong&gt;&lt;strong&gt;caution&lt;/strong&gt;&lt;/strong&gt; here, don't just fall into the habit of learning without really practicing what you learned, be proactive in your learning &lt;strong&gt;&lt;strong&gt;learn as you build, build as you learn&lt;/strong&gt;&lt;/strong&gt;. Doing this will both keep you motivated and it will help you master what you have learned.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn the fundamentals.
&lt;/h2&gt;

&lt;p&gt;A lot of companies will prefer to hire someone with a better understanding of the fundamentals of a particular language or domain, one who knows what is happening under the hood - if you are going into Web then start with the basics of HTML, CSS, and JavaScript and learn them well or whatever the fundamentals are in your choosing domain, a good knowledge of this will help you when you move up to learn any of frameworks such as ReactJs, VueJs or Angular for front end web developers.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NB&lt;/strong&gt;: If you are thinking of starting out as a web dev, then a good knowledge of Vanilla JavaScript will definitely pay off, JavaScript has become a very versatile programming language, so you might want to spend some time learning it.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Be up to date, Be current.
&lt;/h2&gt;

&lt;p&gt;Understand your specific industry and know where it is, at every point in time and where it is heading to, knowing this will help you tailor your learning to in-demand skills. You can subscribe to any of these online technology media for updates &lt;a href="//techcrunch.com"&gt;Techcrunch&lt;/a&gt;, &lt;a href="//engadget.com"&gt;Engadget&lt;/a&gt;, &lt;a href="//thenextmedia.com"&gt;The Next Media&lt;/a&gt; and many more, you could also read yearly State of the Developer Report, that is published by different organizations.&lt;/p&gt;

&lt;h2&gt;
  
  
  Join a community.
&lt;/h2&gt;


&lt;blockquote class="twitter-tweet"&gt;
&lt;p&gt;If getting into tech is your goal for 2020&lt;br&gt;&lt;br&gt;I recommend building a community around you&lt;br&gt;&lt;br&gt;Build relationships with people who already developers&lt;br&gt;&lt;br&gt;Get to know people who are on the journey with you&lt;br&gt;&lt;br&gt;Look for and help people who are at the start of their journey&lt;/p&gt;— Fresh Prince of JavaScript (&lt;a class="comment-mentioned-user" href="https://dev.to/willjohnsonio"&gt;@willjohnsonio&lt;/a&gt;
) &lt;a href="https://twitter.com/willjohnsonio/status/1214280313347678213?ref_src=twsrc%5Etfw"&gt;January 6, 2020&lt;/a&gt;
&lt;/blockquote&gt;  

&lt;p&gt;As you build a career in tech, it will become obvious that you need to be close to people of like mind, especially when you are just starting out learning technology things can become boring sooner than you think. That's why tech communities are so helpful, there are usually general tech communities or technology-specific tech communities, find one in your region and join, you can easily find one on &lt;a href="//meetup.com"&gt;Meetup&lt;/a&gt;. There are also online tech communities and you can find them on &lt;a href="https://scotch.io/bar-talk/the-top-tech-people-to-follow-on-twitter-for-your-stack"&gt;Twitter&lt;/a&gt;, &lt;a href="https://slofile.com/category/Tech"&gt;Slack&lt;/a&gt; or Facebook, these are also very helpful. &lt;/p&gt;

&lt;h2&gt;
  
  
  Get a mentor.
&lt;/h2&gt;

&lt;p&gt;This is great if you can, getting someone who is more experienced in the field you are interested in, someone you can look up to and ask questions whenever you are blocked would be a plus. But I know finding a mentor can be quite a thing so even if your don't have or can't find an active mentor, the community is always open on twitter, you can also ask your questions in forums or on stackoverflow and you would sure get an answer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build an online developer profile.
&lt;/h2&gt;

&lt;p&gt;Having a GitHub developer account, can serve as your online profile, it is most likely where employers will want to look at to determine if you are a good fit for the position you are applying for, so create your profile and start commiting code to it regularly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practice algorithm skills.
&lt;/h2&gt;

&lt;p&gt;It is also important to learn and improve on your algorithm skills, most companies that you might want to apply to will want to test your algorithm skills, so start practicing in whatever programming languages you choose and there are platforms for this, such as &lt;a href="http://leetcode.com/"&gt;leetcode&lt;/a&gt; and &lt;a href="https://www.hackerrank.com/"&gt;HackerRank&lt;/a&gt;, or you can as well join the &lt;a href="https://www.freecodecamp.org/news/projecteuler100-coding-challenge-competitive-programming/amp/?__twitter_impression=true"&gt;#ProjectEuler&lt;/a&gt; challenge by FreeCodeCamp.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Begin to imagine or think of a &lt;em&gt;project&lt;/em&gt; you can build with the knowledge of what you have or still learning, pen it down and start building it as you progress in your learning.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Always ask questions.
&lt;/h2&gt;

&lt;p&gt;One secret of becoming better than you were in tech is your ability to ask questions and as it is always said “Google is your friend”, no matter how foolish you think your question may sound, you will always get an answer to it if you learn to use your search engine. You can also get helpful answers from platforms such as &lt;a href="https://www.quora.com"&gt;Quora&lt;/a&gt;, &lt;a href="https://stackoverflow.com/"&gt;Stack Overflow&lt;/a&gt;, &lt;a href="https://coderwall.com/"&gt;Coderwall&lt;/a&gt;, &lt;a href="http://dev.to"&gt;Dev.to&lt;/a&gt;, &lt;a href="https://hashnode.com/"&gt;Hashnode&lt;/a&gt; and even twitter to your questions.&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>100daysofcode</category>
      <category>career2peak</category>
      <category>codedinafrica</category>
    </item>
    <item>
      <title>2019: Reflection of a Software Engineer.</title>
      <dc:creator>Aosu Stephen Terver</dc:creator>
      <pubDate>Wed, 01 Jan 2020 13:46:33 +0000</pubDate>
      <link>https://dev.to/truetechcode/2019-reflection-of-a-software-engineer-1cfa</link>
      <guid>https://dev.to/truetechcode/2019-reflection-of-a-software-engineer-1cfa</guid>
      <description>&lt;p&gt;At the dawn of the year 2019, I was determined to make a difference in my Software Development career - looking back 12 months down the line, I am so grateful to God for the progress and the journey so far in becoming a more confident software engineer and to everyone who contributed in making this possible, I say thank you. Yes it was not without challenges but I am happy I made the choice, I  will be highlighting some of the high-points in my journey for 2019 in this post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Microverse
&lt;/h2&gt;

&lt;p&gt;I started out the year with my acceptance into &lt;a href="https://twitter.com/microverseinc"&gt;Microverse&lt;/a&gt; full-time program - A coding school that accepts only 1% of applicants from all over the world to be trained as software developers. The program was nothing like I had experienced before, it was immersive but I loved every part of it, while on the program I met some wonderful developers &lt;a href="https://twitter.com/shloch"&gt;@shloch&lt;/a&gt;, &lt;a href="https://twitter.com/Shshamim090"&gt;@Shshamim090&lt;/a&gt;, &lt;a href="https://twitter.com/raphael_noriode"&gt;@raphael_noriode&lt;/a&gt;, &lt;a href="https://twitter.com/YirenkyiPhilip"&gt;@YirenkyiPhilip&lt;/a&gt;, &lt;a href="https://twitter.com/daniel_wesego"&gt;@daniel_wesego&lt;/a&gt;, &lt;a href="https://twitter.com/juzQrios"&gt;@juzQrios&lt;/a&gt;, and many others from around the world with whom I learned and worked together and this was done remotely, which made the experience even more exciting, and my mentor &lt;a href="https://twitter.com/jeton_thaci"&gt;@jeton_thaci&lt;/a&gt; and career coach &lt;a href="https://twitter.com/TheBestCPRW"&gt;@TheBestCPRW&lt;/a&gt; who were very helpful along the way. &lt;/p&gt;

&lt;p&gt;My progress while on the program was enormous, moving from a total novice in the Ruby programming language to building projects with the language such as minimal clone of &lt;a href="https://github.com/truetechcode/facebook-clone"&gt;FaceBook&lt;/a&gt; and &lt;a href="https://github.com/truetechcode/private-events"&gt;Eventbrite&lt;/a&gt;, from a zero in JavaScript to learning advanced concepts of Object-Oriented and Functional Programming in JavaScript (ES6) and building projects such as a &lt;a href="https://github.com/truetechcode/Restaurant-Page"&gt;Restaurant page&lt;/a&gt; and the classic &lt;a href="https://github.com/truetechcode/battleship-game"&gt;BattleShip&lt;/a&gt; game and from never using ReactJs to building my &lt;a href="https://terveraosu.now.sh"&gt;portfolio&lt;/a&gt; and a simple &lt;a href="https://github.com/truetechcode/calculator"&gt;calculator&lt;/a&gt; with ReactJs and so many other things I learned along the way.&lt;/p&gt;

&lt;p&gt;During the course of my learning this year I went through countless articles, video tutorials and courses of particular note is &lt;a href="http://freecodecamp.org/"&gt;FreeCodeCamp&lt;/a&gt; and &lt;a href="https://www.theodinproject.com"&gt;The Odin Project&lt;/a&gt;, to all the authors of these resources I am greatly indebted, if you never wrote that article, made that video or course, learning would be more difficult but you made it seamless, thanks for sharing your knowledge with the community. I was able to also pay it forward by writing my first technical article &lt;a href="https://hashnode.com/post/how-i-setup-ssh-access-to-my-github-repository-ck0k3eusx001dqfs1vjf0t5i5"&gt;How I Setup SSH Access To My GitHub Repository&lt;/a&gt; and then two others &lt;a href="https://hashnode.com/post/how-i-setup-a-node-development-environment-with-webpack-and-eslint-ck15lf1ub002eyts1qedizrg2"&gt;How I Setup A Node Development Environment with Webpack&lt;/a&gt; and &lt;a href="https://dev.to/truetechcode/setting-up-cors-on-a-rails-app-2do0"&gt;Eslint and Setting Up CORS On A Rails App&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Community
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--L8P5DR_0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6i2r8hi24tj8vbzbydov.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--L8P5DR_0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/6i2r8hi24tj8vbzbydov.jpg" alt="Team Makurdi to DevFestAbuja2019"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I am a firm believer in the role of communities as a pivotal part of our progress, this is summed up in the Ubuntu philosophy which states “I am because we are”. This is even more glaring in the journey of becoming a Software Engineer, it can be boring so quickly with so much to learn, for me, the tech community has been a driving force in my learning journey, in a bid to lighting up and gather momentum along, I found and joined the &lt;a href="https://twitter.com/bntechforum"&gt;@bntechforum&lt;/a&gt; and &lt;a href="https://twitter.com/GDGMakurdi"&gt;@GDGMakurdi&lt;/a&gt;, two local tech communities in Benue, Nigeria doing amazingly well in supporting newbies locally to start a career in tech. I met so many wonderful developers and community leads just to mention a few &lt;a href="https://twitter.com/ea_pius"&gt;@ea_pius&lt;/a&gt;, &lt;a href="https://twitter.com/amacodes"&gt;@amacodes&lt;/a&gt;, &lt;a href="https://twitter.com/umarauna"&gt;@umarauna&lt;/a&gt;, &lt;a href="https://twitter.com/auwalms"&gt;@auwalms&lt;/a&gt;,&lt;a href="https://twitter.com/josiahoyahaya"&gt;@josiahoyahaya&lt;/a&gt;, &lt;a href="https://twitter.com/Eko_Uko_Onaji"&gt;@Eko_Uko_Onaji&lt;/a&gt;, &lt;a href="https://twitter.com/comfort_egbe"&gt;@comfort_egbe&lt;/a&gt;, &lt;a href="https://twitter.com/orpaakawejr"&gt;@orpaakawejr&lt;/a&gt;, &lt;a href="https://twitter.com/Lewi_keezy"&gt;@Lewi_keezy&lt;/a&gt; you all made me go the extra mile in becoming a better coder, thanks again. &lt;br&gt;
I attended many in-person meetups got many swags and had the opportunity of starting my journey as a tech speaker, I went on to speak at three tech events, DevFest in Makurdi, DevFest in Abuja and Evolve 1.0 in Makurdi at each of these events I was able to share my knowledge with the community and it was such an exciting experience.&lt;/p&gt;

&lt;p&gt;I became part of the Tech Twitter community and I met a lot of wonderful influencers in tech, they all made the journey worthwhile as they shared their stories and lessons learned on their journeys as developers, a special thanks to &lt;a href="https://twitter.com/jamesqquick"&gt;@jamesqquick&lt;/a&gt; for gifting me a paid Udemy course. I was able to complete the #100DaysofCode challenge and I contributed to open source at the 2019 #OctoberFest celebration.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mentorship
&lt;/h2&gt;

&lt;p&gt;This year I volunteered to mentor and support newbies and experienced developers in tech both in-person and remotely, thanks to &lt;a href="https://twitter.com/andela_alc"&gt;@andela_alc&lt;/a&gt;, Facebook DevC, &lt;a href="https://twitter.com/naijahacks"&gt;@naijahacks&lt;/a&gt;, and &lt;a href="https://twitter.com/microverseinc"&gt;@microverseinc&lt;/a&gt; for giving me the platform to share my knowledge with others.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Machine
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ECXgtZHa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zuawemi0jn6j5sjphhe1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ECXgtZHa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/zuawemi0jn6j5sjphhe1.jpg" alt="Dell Latitude N5040 Laptop"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;My 7-year-old Pet, Dell Latitude N5040 Laptop made all this possible, it has gone through a lot, thanks for keeping up with me this far.&lt;/p&gt;

&lt;h2&gt;
  
  
  2020
&lt;/h2&gt;

&lt;p&gt;Wow! There will be more fun in 2020 as I will be doing more community work, speaking, writing and mentoring. I will also be learning new stuff like; GastbyJs, GraphQl, VueJs and lots more while also mastering my Ruby on Rails and ReactJs skills. I will also need a job where I can pour my energy.&lt;/p&gt;

</description>
      <category>2019review</category>
      <category>career</category>
      <category>developerstory</category>
      <category>codedinafrica</category>
    </item>
    <item>
      <title>Setting Up CORS On A Rails App</title>
      <dc:creator>Aosu Stephen Terver</dc:creator>
      <pubDate>Fri, 22 Nov 2019 18:44:56 +0000</pubDate>
      <link>https://dev.to/truetechcode/setting-up-cors-on-a-rails-app-2do0</link>
      <guid>https://dev.to/truetechcode/setting-up-cors-on-a-rails-app-2do0</guid>
      <description>&lt;h1&gt;
  
  
  Problem
&lt;/h1&gt;

&lt;p&gt;I was trying to integrate a Rails API with a React front end when I encountered an error message:&lt;br&gt;
&lt;code&gt;Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://immense-savannah-47088.herokuapp.com/api/v1/books. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing&lt;/code&gt;.&lt;/p&gt;
&lt;h1&gt;
  
  
  Solution
&lt;/h1&gt;

&lt;p&gt;In an effort to solve the problem I tried several suggested solutions including this one I saw in a &lt;a href="https://medium.com/@admatbandara/setting-up-cors-to-my-rails-api-a6184e461a0f"&gt;Medium&lt;/a&gt; article that requires the use of the &lt;code&gt;rack-cors&lt;/code&gt; ruby gem.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. Add rack-cors Gem
&lt;/h2&gt;

&lt;p&gt;In your &lt;em&gt;gemfile&lt;/em&gt; you should add the following line or in some cases, it is commented out, you just need to uncomment it:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gem 'rack-cors', :require =&amp;gt; 'rack/cors'&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Bundle install
&lt;/h2&gt;

&lt;p&gt;After adding the &lt;code&gt;rack-cors&lt;/code&gt; gem you will need to run the following command, to install the gem:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ bundle install&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  3. Add the configuration in the Application.rb
&lt;/h2&gt;

&lt;p&gt;Add the following lines of code to your &lt;code&gt;application.rb&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module YourApp
  class Application &amp;lt; Rails::Application

    # ...

    config.middleware.insert_before 0, "Rack::Cors" do
      allow do
        origins '*'
        resource '*', :headers =&amp;gt; :any, :methods =&amp;gt; [:get, :post, :options]
      end
    end
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This should work as long as you won’t be using Heroku or other services that use Rack-based servers but if you intend to use Heroku then you will do this instead of the number three-step above.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Add the configuration in the Config.ru
&lt;/h2&gt;

&lt;p&gt;Add the following lines of code to the end of your &lt;code&gt;config.ru&lt;/code&gt; file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# ....

require 'rack/cors'
use Rack::Cors do

 # allow all origins in development
 allow do
   origins '*'
   resource '*',
       :headers =&amp;gt; :any,
       :methods =&amp;gt; [:get, :post, :delete, :put, :options]
 end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the &lt;a href="https://www.rubydoc.info/gems/rack-cors/0.4.0"&gt;Ruby documentation&lt;/a&gt; for more information on using &lt;code&gt;Rack middleware&lt;/code&gt; and the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS"&gt;MDN&lt;/a&gt; to learn more about &lt;code&gt;CORS&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>cors</category>
      <category>api</category>
      <category>react</category>
    </item>
  </channel>
</rss>
