<?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: Vincenzo Chiovaro</title>
    <description>The latest articles on DEV Community by Vincenzo Chiovaro (@vincenzochiovaro).</description>
    <link>https://dev.to/vincenzochiovaro</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%2F1057825%2F32853004-f176-4317-95c8-0f8b871968b8.jpeg</url>
      <title>DEV Community: Vincenzo Chiovaro</title>
      <link>https://dev.to/vincenzochiovaro</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vincenzochiovaro"/>
    <language>en</language>
    <item>
      <title>Help: Implementing Authentication in RESTful API</title>
      <dc:creator>Vincenzo Chiovaro</dc:creator>
      <pubDate>Mon, 17 Apr 2023 09:08:59 +0000</pubDate>
      <link>https://dev.to/vincenzochiovaro/help-implementing-authentication-in-restful-api-k4a</link>
      <guid>https://dev.to/vincenzochiovaro/help-implementing-authentication-in-restful-api-k4a</guid>
      <description>&lt;p&gt;Hello fellow developers! 👋&lt;/p&gt;

&lt;p&gt;I am a freshly graduated software developer, I am currently working on creating a RESTful API using Node.js with Express and PostgreSQL. I am almost done with the endpoints, but now I am looking to implement an authentication process so that users can have the option to log in when using my API in their frontend applications.&lt;/p&gt;

&lt;p&gt;However, I am feeling a bit lost on where to start with authentication in my API. I am using an MVC architecture, and I'm not sure where to implement and write the authentication code. Should I create a completely separate file to handle authentication? I would greatly appreciate any advice or guidance on how to proceed with implementing authentication in my API.&lt;/p&gt;

&lt;p&gt;My Github Repo if you want to have a look at my code:&lt;a href="https://github.com/vincenzochiovaro/Mealtime-backEnd"&gt;https://github.com/vincenzochiovaro/Mealtime-backEnd&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you in advance for your help, and I apologize for any confusion or lack of experience in this area.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Mealtime: A Beginner-Friendly API for Simplified Meal Data</title>
      <dc:creator>Vincenzo Chiovaro</dc:creator>
      <pubDate>Thu, 06 Apr 2023 08:16:17 +0000</pubDate>
      <link>https://dev.to/vincenzochiovaro/mealtime-a-beginner-friendly-api-for-simplified-meal-data-3h0c</link>
      <guid>https://dev.to/vincenzochiovaro/mealtime-a-beginner-friendly-api-for-simplified-meal-data-3h0c</guid>
      <description>&lt;p&gt;Hello fellow developers! I'm excited to share my latest project, Mealtime, a beginner-friendly API built on top of the MealDB database. This project is designed to help beginners learn how to interact with APIs and practice their programming skills. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Project Overview&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let me share a funny story about how Mealtime came to be. As a recent graduate with a passion for programming, I tried to teach my wife, who is a self-proclaimed "newbie" in coding, how to interact with APIs. However, I quickly realized that the complex APIs and data structures I was explaining were overwhelming for her, this It made me realize that there was a need for a more beginner-friendly approach to API interactions.&lt;/p&gt;

&lt;p&gt;That's when I came up with the idea of Mealtime. I wanted to build an API that would make it easy for beginners to learn the ropes of programming without feeling overwhelmed. With humility and self-criticism in mind, I set out to create a simple and user-friendly API that would strip away the complexities and present only the essential meal information.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Technical Details&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Mealtime is built using Node.js, Express, and PostgreSQL. The data is fetched from the MealDB API using Axios. The code snippet below shows an example of the seeding process for inserting chicken meal data into the "chickenMeals" table in the database:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const insertChickenMealsData = async () =&amp;gt; {&lt;br&gt;
  try {&lt;br&gt;
    const chickenMealData = await requestChickenMeals();&lt;br&gt;
    for (const meal of chickenMealData) {&lt;br&gt;
      const query = {&lt;br&gt;
        text:&lt;/code&gt;&lt;code&gt;&lt;br&gt;
              INSERT INTO chickenMeals (title, category, instructions, image, youtube, ingredients)&lt;br&gt;
              VALUES ($1, $2, $3, $4, $5, $6::json)&lt;br&gt;
&lt;/code&gt;,&lt;br&gt;
        &lt;code&gt;values: [&lt;br&gt;
          meal.title,&lt;br&gt;
          meal.category,&lt;br&gt;
          meal.instructions,&lt;br&gt;
          meal.image,&lt;br&gt;
          meal.youtube || null,&lt;br&gt;
          JSON.stringify(meal.ingredients),&lt;br&gt;
        ],&lt;br&gt;
      };&lt;/code&gt;&lt;br&gt;
&lt;code&gt;&lt;br&gt;
      await db.query(query);&lt;br&gt;
    }&lt;br&gt;
    console.log("inserted data into chicken table successfully");&lt;br&gt;
  } catch (err) {&lt;br&gt;
    console.error("Error inserting chicken meal data:", err);&lt;br&gt;
  }&lt;br&gt;
};&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;After successfully seeding the database, my next step is to create the endpoints for the API. These endpoints will allow users to interact with the meal data and perform various CRUD operations.&lt;/p&gt;

&lt;p&gt;Once the endpoints are up and running, users will be able to access meal data, add new meals, update existing meals, and delete meals as needed.&lt;/p&gt;

&lt;p&gt;I'm open to contributions and assistance from fellow developers! If you're interested in helping out or have any suggestions, please feel free to send me a message.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Feedback and Opinions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As this project is still a work in progress, I would greatly appreciate your feedback and opinions! If you have any suggestions, comments, or questions, please feel free to share them in the comments section below. Your feedback will be valuable in shaping the direction of this project and making it even more beginner-friendly.&lt;/p&gt;

&lt;p&gt;Repository:&lt;br&gt;
You can find the code for Mealtime on my GitHub repository: &lt;a href=""&gt;https://github.com/vincenzochiovaro/Mealtime-backend&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
