<?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>Forem: Ayokunle Ola-Akande</title>
    <description>The latest articles on Forem by Ayokunle Ola-Akande (@ayokunle_olaakande_e8831).</description>
    <link>https://forem.com/ayokunle_olaakande_e8831</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%2F3573135%2F71bb0e03-e055-49b8-8dde-fe46e661af42.png</url>
      <title>Forem: Ayokunle Ola-Akande</title>
      <link>https://forem.com/ayokunle_olaakande_e8831</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/ayokunle_olaakande_e8831"/>
    <language>en</language>
    <item>
      <title>Building a Dynamic Profile Endpoint</title>
      <dc:creator>Ayokunle Ola-Akande</dc:creator>
      <pubDate>Sun, 19 Oct 2025 19:37:56 +0000</pubDate>
      <link>https://forem.com/ayokunle_olaakande_e8831/building-a-dynamic-profile-endpoint-1l48</link>
      <guid>https://forem.com/ayokunle_olaakande_e8831/building-a-dynamic-profile-endpoint-1l48</guid>
      <description>&lt;p&gt;I recently completed Stage 0 of the Backend.&lt;br&gt;
The task involved creating a simple RESTful API endpoint that returns personal profile information along with a random cat fact fetched from a third-party API.&lt;br&gt;
Task Overview&lt;/p&gt;

&lt;p&gt;The main goal was to build a /me endpoint that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Returns structured JSON data with the following fields:&lt;/li&gt;
&lt;li&gt;- status&lt;/li&gt;
&lt;li&gt;- user (containing email, name, and stack)&lt;/li&gt;
&lt;li&gt;- timestamp (current UTC time in ISO 8601 format)&lt;/li&gt;
&lt;li&gt;- fact (a random cat fact fetched from the Cat Facts API)&lt;/li&gt;
&lt;li&gt;Handles API errors gracefully&lt;/li&gt;
&lt;li&gt;Ensures each request returns a fresh cat fact and timestamp&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Backend Framework: Node.js (Express)&lt;/li&gt;
&lt;li&gt;Language: TypeScript&lt;/li&gt;
&lt;li&gt;Testing Tools: Jest &amp;amp; Supertest&lt;/li&gt;
&lt;li&gt;Deployment Platform: (e.g., Railway / Render / AWS)&lt;/li&gt;
&lt;li&gt;Version Control: GitHub&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h3&gt;
  
  
  Key Features
&lt;/h3&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Integrated a third-party API to fetch live data dynamically.&lt;/li&gt;
&lt;li&gt;Implemented proper error handling and fallback mechanisms for API failures.&lt;/li&gt;
&lt;li&gt;Used ISO 8601 format to ensure consistent timestamps.&lt;/li&gt;
&lt;li&gt;Added automated tests to validate response structure and reliability.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to consume and handle external API responses effectively.&lt;/li&gt;
&lt;li&gt;Best practices for structuring a RESTful endpoint.&lt;/li&gt;
&lt;li&gt;The importance of consistent response formatting and proper HTTP status codes.&lt;/li&gt;
&lt;li&gt;How to test and verify endpoints using Jest and Supertest.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Links
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Live Endpoint: &lt;a href="https://hng-backend-stage-0-l1vs.onrender.com/me" rel="noopener noreferrer"&gt;https://hng-backend-stage-0-l1vs.onrender.com/me&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;GitHub Repository: &lt;a href="https://github.com/Ayokayzy/hng-backend-stage-0" rel="noopener noreferrer"&gt;https://github.com/Ayokayzy/hng-backend-stage-0&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>typescript</category>
      <category>api</category>
      <category>tutorial</category>
      <category>node</category>
    </item>
  </channel>
</rss>
