<?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: Srushti Kulkarni</title>
    <description>The latest articles on DEV Community by Srushti Kulkarni (@srushti_kulkarni_ff24f6a2).</description>
    <link>https://dev.to/srushti_kulkarni_ff24f6a2</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%2F2652215%2F22edae73-8cb8-4f9f-8815-60a00f7bbe96.jpg</url>
      <title>DEV Community: Srushti Kulkarni</title>
      <link>https://dev.to/srushti_kulkarni_ff24f6a2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/srushti_kulkarni_ff24f6a2"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>Srushti Kulkarni</dc:creator>
      <pubDate>Sun, 30 Nov 2025 07:58:42 +0000</pubDate>
      <link>https://dev.to/srushti_kulkarni_ff24f6a2/-3g3n</link>
      <guid>https://dev.to/srushti_kulkarni_ff24f6a2/-3g3n</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/neeleshwark17" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&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%2Fuser%2Fprofile_image%2F701140%2F5b3f7155-efdb-4cad-bb4c-d14b5cf4074f.jpeg" alt="neeleshwark17"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/neeleshwark17/llm-and-ai-for-full-stack-developers-a-practical-guide-to-modern-development-30cg" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;LLM and AI for Full-Stack Developers: A Practical Guide to Modern Development&lt;/h2&gt;
      &lt;h3&gt;Neel ・ Jun 11 '25&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#ai&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#llm&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#chatgpt&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#githubcopilot&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>ai</category>
      <category>llm</category>
      <category>chatgpt</category>
      <category>githubcopilot</category>
    </item>
    <item>
      <title>Federated Auth &amp; O Auth 2.0</title>
      <dc:creator>Srushti Kulkarni</dc:creator>
      <pubDate>Thu, 09 Oct 2025 04:51:44 +0000</pubDate>
      <link>https://dev.to/srushti_kulkarni_ff24f6a2/federated-auth-3350</link>
      <guid>https://dev.to/srushti_kulkarni_ff24f6a2/federated-auth-3350</guid>
      <description>&lt;p&gt;Hello All! From 1 week I'm working on federated auth(Google Sign in) &amp;amp; I've encountered with lots of errors.&lt;/p&gt;

&lt;p&gt;So lets understand,&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;##  what is Federated Auth?&lt;br&gt;
*&lt;/em&gt;&lt;br&gt;
Basically its a system that allows user to login across multiple application or domain&lt;br&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%2Fjcxwj0mgp1sjqv00yssy.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%2Fjcxwj0mgp1sjqv00yssy.png" alt=" " width="800" height="800"&gt;&lt;/a&gt; using single set of credentials which are managed by trusted identity provider(Google, Apple) without having to create a new account for each one.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;That means when you do sign in with google or apple then you are using federated auth.&lt;/li&gt;
&lt;li&gt;Now lets understand it with the help of below dig.&lt;/li&gt;
&lt;/ul&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%2F5vzbgwbb99qlxfmvp05g.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%2F5vzbgwbb99qlxfmvp05g.png" alt=" " width="280" height="712"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the flow of when you do sign in with Google.&lt;br&gt;
So basically,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;when you do sign in with google it redirect to google's login page
&lt;/li&gt;
&lt;li&gt;when user login with credentials, google verifies the identity and sends a access token / id_token.
3.The application verifies the token i.e is token expired or not &amp;amp; if not
4.Backend uses a token's info i.e Google account info like profile photo, username, emailId etc.&lt;/li&gt;
&lt;/ol&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%2Fsqypbntz3yjeyo2drivj.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%2Fsqypbntz3yjeyo2drivj.png" alt=" " width="611" height="577"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and when the authentication done, you've to do one thing i.e you've to set the isLoggedIn : true , if our backedn verifies that data it should redirect to desired page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// Assume this is the function called after checking the authentication status
function handleAuthStatus(authStatus) {
    // Check if the user is successfully authenticated
    if (authStatus.logged === true) {
        console.log("Authentication successful.Redirecting to dashboard");

        // Redirect the user to the main application page
        window.location.href = '/dashboard'; 

    } else {
       // Redirect the user to the main login page again
        window.location.href = '/login';
    }
}

// Example usage with a dummy check 

const userSession = {
    logged: true, // This flag would be determined by a valid token/session
    username: "user123"
};

handleAuthStatus(userSession);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;OAuth 2.0&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In simple language OAuth is , one application access data from another application with user concent.&lt;/li&gt;
&lt;li&gt;Simple eg. , Allowing canva to access insta photos/media.&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;Suppose you are on canva and you click: Connect to instagram.&lt;/li&gt;
&lt;li&gt;Canva Redirect you to instagram login page.&lt;/li&gt;
&lt;li&gt;Canva wants to access your media so instagram asks you to allow or not   allowed.&lt;/li&gt;
&lt;li&gt;After allowing insta issues an access token.&lt;/li&gt;
&lt;li&gt;Canva use that token to fetch your photos from instagram.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;this is the process of OAuth. These 2 are almost same but little difference is that in federated auth it trusts on identity provider and verifies the access token and in OAuth it takes concent from user. &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%2Fi8o1qtlqi172xlwc3qu8.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%2Fi8o1qtlqi172xlwc3qu8.png" alt=" " width="624" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>oauth</category>
      <category>federatedauth</category>
      <category>node</category>
    </item>
    <item>
      <title>MongoDb: connecting with small apps.</title>
      <dc:creator>Srushti Kulkarni</dc:creator>
      <pubDate>Tue, 19 Aug 2025 18:32:37 +0000</pubDate>
      <link>https://dev.to/srushti_kulkarni_ff24f6a2/mongodb-connecting-with-small-apps-1kbe</link>
      <guid>https://dev.to/srushti_kulkarni_ff24f6a2/mongodb-connecting-with-small-apps-1kbe</guid>
      <description>&lt;p&gt;Hello, Everyone! Starting with MongoDb!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What is MongoDB&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In simple terms its a database where in we can store data! &lt;/li&gt;
&lt;li&gt;By defination, its a No-Sql database that stores a data in flexible and  document-oriented format. &lt;/li&gt;
&lt;li&gt;Data is stores as JSON-like documnents.&lt;/li&gt;
&lt;li&gt;It is Scalable means it good for handling very large datasets.&lt;/li&gt;
&lt;li&gt;Here we can see the how the data store in db:&lt;/li&gt;
&lt;/ul&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%2Fjkxvvjkcnxw7zyy3g8s8.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%2Fjkxvvjkcnxw7zyy3g8s8.png" alt=" " width="453" height="245"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So let's start with how can you connect with MongoDB:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;a href="https://www.mongodb.com/products/platform/atlas-database" rel="noopener noreferrer"&gt;https://www.mongodb.com/products/platform/atlas-database&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create your free account. This will be central hub for managing clusters.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make a free cluster here.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fwnly6otvxhcgt540dc9m.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%2Fwnly6otvxhcgt540dc9m.png" alt=" " width="800" height="535"&gt;&lt;/a&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%2Fmghy8usasivmi1irw5kw.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%2Fmghy8usasivmi1irw5kw.png" alt=" " width="800" height="431"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Here yo've to select free one and then just add the cluster name and select the create button.&lt;/li&gt;
&lt;li&gt;After Creating the cluster you'll get username and password which is important for connection string. 
-Copy this username , password.&lt;/li&gt;
&lt;/ul&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%2Flan8gxh76pvhyf9pakmr.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%2Flan8gxh76pvhyf9pakmr.png" alt=" " width="800" height="585"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now, Go to &lt;strong&gt;Network Access&lt;/strong&gt; &amp;amp; add IP address just like this &amp;amp; then confirm it.&lt;/li&gt;
&lt;/ul&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%2Fslergidkf20w5n4j8n7a.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%2Fslergidkf20w5n4j8n7a.png" alt=" " width="800" height="649"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Now Go to Cluster and click on Connect , it will display this page. &lt;/li&gt;
&lt;li&gt;Select connect to your application.Click on next&lt;/li&gt;
&lt;/ul&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%2Fwu8vg0bz32mv2r5zrq4p.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%2Fwu8vg0bz32mv2r5zrq4p.png" alt=" " width="800" height="605"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You'll see connection string which is very important for to connect database, now replace db-password with your password and copy it.
&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%2Felw01dxki3vre43sqib6.png" alt=" " width="800" height="609"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  From Here actual setup will start:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Write &lt;strong&gt;npm init -y&lt;/strong&gt; (initialize node project)&lt;/li&gt;
&lt;li&gt;Install mongoose for connection.

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Mongoose&lt;/strong&gt; is an ODM (Object Data Modeling) library for MongoDB in    Node.js.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Mongoose helps by adding a layer of structure and useful features on top of MongoDB.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Now make db folder and inside that db folder make db.connect.js and add this code , which allows us to connect with db &lt;/p&gt;&lt;/li&gt;

&lt;/ul&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%2F3q57l41solzrigkgq5j1.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%2F3q57l41solzrigkgq5j1.png" alt=" " width="750" height="512"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Make dotenv file where in you can store the connection string!&lt;br&gt;
(&lt;strong&gt;npm install dotenv&lt;/strong&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Mkae a model folder, Inside it just add file like note.models.js (you can use anything).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Here we are creating a dataModel where in we can add the datatypes of data.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fk066ll86s6gi30phk0y2.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%2Fk066ll86s6gi30phk0y2.png" alt=" " width="727" height="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Take a json Data from Chatgpt and give the name to that file like Notes.json!&lt;/li&gt;
&lt;li&gt;Remember the fields in json file is same as models.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Now Create another file which index.js where in you've to declare seedData fucntion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Make a similar file , only you've to change is data inside the seed function &amp;amp; instead of cars.json file you've to use the notes.json file only!&lt;br&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%2Fn3jh1hhgpi7jh6g87btr.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%2Fn3jh1hhgpi7jh6g87btr.png" alt=" " width="651" height="897"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;call the SeedData function.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Execute &lt;strong&gt;node index.js&lt;/strong&gt; you'll get&lt;/p&gt;&lt;/li&gt;
&lt;/ul&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%2Fuhc0gqd0kn4scw8o20cc.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%2Fuhc0gqd0kn4scw8o20cc.png" alt=" " width="754" height="192"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So this is the basic proces of connecting and seeding data in MongoDb.&lt;/p&gt;

</description>
      <category>mongodb</category>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
    </item>
    <item>
      <title>NPM:Node Package Manager</title>
      <dc:creator>Srushti Kulkarni</dc:creator>
      <pubDate>Tue, 21 Jan 2025 01:55:27 +0000</pubDate>
      <link>https://dev.to/srushti_kulkarni_ff24f6a2/npmnode-package-manager-5726</link>
      <guid>https://dev.to/srushti_kulkarni_ff24f6a2/npmnode-package-manager-5726</guid>
      <description>&lt;p&gt;Hello All, Let's talk about the NPM. The people who are working on JavaScript, ReactJs, NodeJs might be familiar with NPM. so basically NPM is package manager used in JavaScript to manage the libraries, dependencies and projects.&lt;/p&gt;

&lt;p&gt;First of all *&lt;em&gt;whats the NPM? *&lt;/em&gt; As per title we can say , npm is abbrevation for Node Package Manager which manages the package or we can say that it is a standard repository for all the pacakages.&lt;/p&gt;

&lt;p&gt;For building an application from scrtach, first of all we have to write the command which is &lt;br&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%2Fgnz72qmvsrc8md9yc8l4.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%2Fgnz72qmvsrc8md9yc8l4.png" alt="NPM init Command" width="135" height="24"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It setup the foundation for NodeJs project. It tracks the project dependency and script. Whenver we run command &lt;strong&gt;npm init&lt;/strong&gt; it asks about the package name, version, description, entry point, license, author etc. From this information it creates &lt;strong&gt;package.json&lt;/strong&gt; file which contains the whole information about the application in the JSON format(key-value)pair.&lt;/p&gt;

&lt;p&gt;It looks like this: &lt;br&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%2F9busuam0m42u57qyg94m.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%2F9busuam0m42u57qyg94m.png" alt=" " width="800" height="353"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When we want to install some packages we use the command &lt;strong&gt;npm install package name&lt;/strong&gt;. So here we are installing express package.&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%2F9oc9ww46krg63uouxc98.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%2F9oc9ww46krg63uouxc98.png" alt=" " width="220" height="30"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installing this package, it wraps up express package inside node modules.The node module stores all the packages which we install.&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%2Fshndreslesfpepalkuli.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%2Fshndreslesfpepalkuli.png" alt=" " width="216" height="193"&gt;&lt;/a&gt;&lt;br&gt;
Node modules contains actual data dependencies[data which is used for project].Inside of node modules all the packages are going to store.I've installed the express package and it goes inside the node modules and it looks 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%2F3k9n6hal2r9qqurb7jz0.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%2F3k9n6hal2r9qqurb7jz0.png" alt=" " width="212" height="211"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Whenever we install the packages, inside the package.json file it generates dependencies and all the dependencies are present inside the dependencies with their current version.&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%2F3yif6hqbuaew6l56gmfe.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%2F3yif6hqbuaew6l56gmfe.png" alt=" " width="259" height="99"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Package.lock.json : It tracks all the exact version of all the dependenies.&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%2Fdhosl8gdvqvwwkmxwsuf.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%2Fdhosl8gdvqvwwkmxwsuf.png" alt=" " width="512" height="416"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NPM : Installing the Package.&lt;br&gt;
NPX : Executing the Package.&lt;/p&gt;

&lt;p&gt;So this is about the NPM. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>node</category>
      <category>npm</category>
    </item>
    <item>
      <title>How to write Simple Endpoint and Functions</title>
      <dc:creator>Srushti Kulkarni</dc:creator>
      <pubDate>Sun, 12 Jan 2025 06:56:51 +0000</pubDate>
      <link>https://dev.to/srushti_kulkarni_ff24f6a2/how-to-write-simple-endpoint-and-functions-3905</link>
      <guid>https://dev.to/srushti_kulkarni_ff24f6a2/how-to-write-simple-endpoint-and-functions-3905</guid>
      <description>&lt;p&gt;A month ago I’ve joined KarmanX and where I learnt about how to write simple to advanced level of functions and its endpoints. I’ve got an opportunity to attend the Ankita Mam’s Session, where she explained how to write simple and complex functions and how the API call works, so here I’m going to explain in short how to think and write this functions.&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%2Fbagrh7rzzpzmluj38f5v.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%2Fbagrh7rzzpzmluj38f5v.png" alt=" " width="800" height="451"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the above dig. in simple terms we can say that the client is requesting to server, to extract the data from movie database but now think like a developer perspective. Here we know, the client is requesting to server, to get or to extract all movies from database. From this line we can get some idea for how to send request.&lt;/p&gt;

&lt;p&gt;Basically app.get(‘/movies’,async(req,res)=&amp;gt;{}) is requesting to server to get this movie data whenver user writes ‘/movies’. Inside the try block I’ve declared result variable where I’m calling a function which extract all the movies. Here we are using try-catch block for error handling.&lt;/p&gt;

&lt;p&gt;I’ve declared a function getAllMovies which returns movies. Inside the try block I’ve written if the movies are not present in the movie database [i.e I’m checking the length of the result], it will throw an error 404 with a message ‘No movies found!’. If the movies are present in the datbase, then it will respond with result.&lt;/p&gt;

&lt;p&gt;In the catch block if any internal error is there then it will throw an error 500 with a message internal server error. Here I’ve used async-await. The keyword async before a function makes the function return a promise and the await keyword can only be used inside the async function. The await keyword makes the function pause the execution and wait for resolved promise.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>backenddevelopment</category>
      <category>api</category>
    </item>
  </channel>
</rss>
