<?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: AADARSH B.K.</title>
    <description>The latest articles on DEV Community by AADARSH B.K. (@pekachu17).</description>
    <link>https://dev.to/pekachu17</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%2F886057%2F13e46a39-8ff1-4023-bdd0-5a9f2adf36c1.jpeg</url>
      <title>DEV Community: AADARSH B.K.</title>
      <link>https://dev.to/pekachu17</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pekachu17"/>
    <language>en</language>
    <item>
      <title>7 API ON NODE.JS</title>
      <dc:creator>AADARSH B.K.</dc:creator>
      <pubDate>Wed, 24 Apr 2024 04:56:59 +0000</pubDate>
      <link>https://dev.to/pekachu17/7-api-on-nodejs-l14</link>
      <guid>https://dev.to/pekachu17/7-api-on-nodejs-l14</guid>
      <description>&lt;p&gt;I tried to create a 7 api on node.js to learn it out.&lt;br&gt;
1.TO-DO LIST&lt;br&gt;
I created a basic RESTful API using Express.js to manage a todo list. The API includes endpoints for retrieving all todos, adding a new todo, updating an existing todo, and deleting a todo. To handle JSON requests, I used the bodyParser middleware. Each todo is represented by an &lt;code&gt;id&lt;/code&gt;, &lt;code&gt;task&lt;/code&gt;, and &lt;code&gt;completed&lt;/code&gt; flag. Error handling is implemented to manage cases where a task is missing or an invalid todo ID is provided. The server runs on port 3001 and provides a straightforward interface for managing the todo list.&lt;br&gt;
2.user-authentication API:I created an authentication system using Express.js, bodyParser, and jwt for JSON Web Token generation and verification.The system includes a login endpoint for users to authenticate with their username and password, issuing a JWT token upon successful authentication. Additionally, there is a protected endpoint that requires a valid JWT token to access. A middleware function verifies the token and grants access to the protected resource if the token is valid. The server runs on port 3000 and uses a secret key for JWT token generation and verification.&lt;br&gt;
3.Chat API:I developed a real-time chat application using Express.js for the backend, Socket.io for real-time communication, and plain HTML/CSS/JavaScript for the frontend. The application serves static files from the 'public' directory, including an HTML file for the chat interface. Users can join the chat by entering a username, which is stored in an object to track connected users. Messages sent by users are broadcasted to all connected users, providing a seamless chat experience. The server runs on port 3000 by default but can be configured using the &lt;code&gt;process.env.PORT&lt;/code&gt; variable.&lt;br&gt;
4.Bitcoin API:I created a simple Express.js server that provides a &lt;code&gt;/bitcoin-price&lt;/code&gt; endpoint. This endpoint uses the Axios library to fetch the current price of Bitcoin in USD from the CoinGecko API. If the request is successful, it returns the Bitcoin price as a JSON response. If there's an error during the request, it logs the error and returns a 500 status code with an error message. The server runs on port 3000 and logs a message to indicate that it's running.&lt;br&gt;
5.Event manager:I developed a simple RESTful API using Express.js to manage a list of activities. The API includes endpoints for adding a new activity, retrieving all activities, and retrieving a specific activity by its ID. I used an in-memory array called &lt;code&gt;activities&lt;/code&gt; to store the activity data. The server runs on port 3000 and logs a message to indicate that it's running. This API provides a basic framework for managing activities and can be easily expanded with additional features as needed.&lt;br&gt;
6.Payment API:I developed an Express.js server to handle payment processing using the Stripe API. The server includes two main endpoints: &lt;code&gt;/payment&lt;/code&gt; for creating a new payment intent and &lt;code&gt;/webhook&lt;/code&gt; for handling webhook events from Stripe. The &lt;code&gt;/payment&lt;/code&gt; endpoint accepts a JSON payload with details such as amount, currency, source, and description, then creates a new payment intent and responds with the client secret for the payment intent. The &lt;code&gt;/webhook&lt;/code&gt; endpoint listens for specific events like &lt;code&gt;payment_intent.succeeded&lt;/code&gt; and &lt;code&gt;payment_intent.payment_failed&lt;/code&gt;, and logs the event details accordingly. The server uses the &lt;code&gt;express.json()&lt;/code&gt; middleware to parse JSON request bodies and runs on port 3000. It logs a message to indicate that it's running. Overall, this setup provides a reliable and secure way to process payments using Stripe's payment platform.&lt;br&gt;
7.Fitness Track API:I created an Express.js server to manage a list of activities. The server provides three endpoints: &lt;code&gt;/activities&lt;/code&gt; to add a new activity, &lt;code&gt;/activities&lt;/code&gt; to retrieve all activities, and &lt;code&gt;/activities/:id&lt;/code&gt; to retrieve a specific activity by its ID. The server uses an in-memory array called &lt;code&gt;activities&lt;/code&gt; to store the activity data. It also uses the &lt;code&gt;express.json()&lt;/code&gt; middleware to parse JSON request bodies. The server runs on port 3000 and logs a message to indicate that it's running. This API provides a simple way to manage and retrieve activities, making it useful for various applications.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>THE BASICS.</title>
      <dc:creator>AADARSH B.K.</dc:creator>
      <pubDate>Thu, 18 May 2023 16:56:02 +0000</pubDate>
      <link>https://dev.to/pekachu17/the-basics-l6h</link>
      <guid>https://dev.to/pekachu17/the-basics-l6h</guid>
      <description></description>
      <category>webdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>THE BASICS.</title>
      <dc:creator>AADARSH B.K.</dc:creator>
      <pubDate>Thu, 18 May 2023 15:46:59 +0000</pubDate>
      <link>https://dev.to/pekachu17/the-basics-3642</link>
      <guid>https://dev.to/pekachu17/the-basics-3642</guid>
      <description></description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
