<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Dvippatel on Medium]]></title>
        <description><![CDATA[Stories by Dvippatel on Medium]]></description>
        <link>https://medium.com/@dvippatel98?source=rss-b4b48ddf0606------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*hytUSbGc6O9ec_GH</url>
            <title>Stories by Dvippatel on Medium</title>
            <link>https://medium.com/@dvippatel98?source=rss-b4b48ddf0606------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 04:47:37 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@dvippatel98/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Automate Your Full-Stack App with Docker & Scripts]]></title>
            <link>https://medium.com/@dvippatel98/automate-your-full-stack-app-with-docker-scripts-fed845fc76a8?source=rss-b4b48ddf0606------2</link>
            <guid isPermaLink="false">https://medium.com/p/fed845fc76a8</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[powershell-script]]></category>
            <dc:creator><![CDATA[Dvippatel]]></dc:creator>
            <pubDate>Tue, 09 Jan 2024 11:21:16 GMT</pubDate>
            <atom:updated>2024-01-10T03:54:37.297Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Ever feel like you spend more time dealing with dependencies than actually coding? I know I have. The endless cycle of installing packages, resolving conflicts, and juggling multiple commands for different backends can be enough to make you want to throw your keyboard out the window.</p><p>Imagine a world where you could launch a full-stack application with a single command. ✨ No more dependency nightmares, no more context switching, just pure productivity.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*sWmr1Qzj8BJVzkinCU1fHQ.png" /></figure><h3>Requirements</h3><ol><li><strong>Docker</strong>: For containerization, so that we don’t run into dependency issues.</li><li><strong>Power Shell Script/ Shell Script </strong>: For automating, and running our project with a single command</li></ol><h3>Don’t know Docker yet ?</h3><p>Docker is.. well watch this video, he can probably explain this better than I can. Also, just take your time, cause he covers a lot of information in a short duration &amp; it’s absolutely worth it.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FgAkwW2tuIqE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DgAkwW2tuIqE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FgAkwW2tuIqE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/566a2d2a0f60395a9cbaa97010379c93/href">https://medium.com/media/566a2d2a0f60395a9cbaa97010379c93/href</a></iframe><h3>First Step: dockerfile</h3><p>Here’s my project structure:</p><p><strong>root </strong>-&gt;Docker-Tutorial, <strong>Frontend </strong>-&gt; Docker-Tutorial/client, <strong>Backend </strong>-&gt; Docker-Tutorial/Backend.</p><p>I’ll first make the dockerfile (with no extention) in the client directory.</p><pre># Use the official Node.js image as a base image<br>FROM node:20<br># Set the working directory inside the container<br>WORKDIR /usr/src/app<br># Copy package.json and yarn.lock to install dependencies<br>COPY package.json yarn.lock ./<br># Install dependencies<br>RUN yarn install<br># Copy the rest of the application files<br>COPY . .<br># Expose the port on which the app runs<br>EXPOSE 5173<br># Command to start the application<br>CMD [&quot;yarn&quot;, &quot;start&quot;]</pre><p>I think I will not need to explain the code, as it’s self explanatory, I’m using ‘yarn’ package manager instead of ‘npm’. You can replace the commands as per your need. Also you can easily generate it using chatGPT.</p><p>And do the same thing for the server, In my case I’m using nodejs, So I’ll just <em>cd </em>over to the server directory, make a <em>dockerfile </em>with no extension (thing that comes after ‘.’).</p><p>&amp; in there I’ll just replace</p><p>EXPOSE 5173 with EXPOSE 3000 , cause I’ll be running that in port 3000.</p><h3>Second Step</h3><p>There are simple commands for building and running it</p><p><strong>For server</strong>:</p><p>docker build -t express-server .</p><p>I’m naming the container express-server and run this in your server directory. The ‘.’ indicates that we are running it in the directory that we’ve currently opened</p><p>Now, for running we’ll use</p><p>docker run -p 3000:3000 express-server</p><p>to run it.</p><p><strong>For client</strong>:</p><p>We’ll do the same thing for client</p><p>First cd into client and then run this commands. Change the name ‘react-app’ if you want to.</p><h3>Final Step</h3><p>Head over to the root directory of your project. Now Let’s make the script for running everything in a single command. I’ll name this script</p><p>I’ll name it <em>run_app.ps1 </em>(For windows)</p><pre># Build the Docker image for the Express server<br>Write-Output &quot;Building Express server Docker image...&quot;<br>cd .\server <br>docker build -t express-server .<br>cd ..<br># Run the Express server container<br>Write-Output &quot;Starting Express server container...&quot;<br>docker run -d -p 3000:3000 express-server<br># Build the Docker image for the React app<br>Write-Output &quot;Building React app Docker image...&quot;<br>cd .\client<br>docker build -t react-app .<br>cd ..<br># Run the React app container<br>Write-Output &quot;Starting React app container...&quot;<br>docker run -d -p 5173:5173 react-app<br>Write-Output &quot;Setup complete. Express server and React app are running in Docker containers.&quot;</pre><p>And you can run it in the terminal with ./ps1 . Same thing with unix system you’ll just have to change few commands like from Write-Output to echo and modify the <em>cd </em>command.</p><p>You can check the docker app if you’re containers are running properly</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KSLvm-ohWiUuIS5LciZBFQ.png" /></figure><h3>Outro</h3><p>Feel free to comment down below if you are facing some kind of problem, I’ll be happy to help you’ll.</p><p>Hope you learned something new, drop a follow if you like such quality content.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fed845fc76a8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Routing for dummies (API)]]></title>
            <link>https://medium.com/@dvippatel98/routing-for-dummies-api-7d3caa771823?source=rss-b4b48ddf0606------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d3caa771823</guid>
            <category><![CDATA[backend]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <dc:creator><![CDATA[Dvippatel]]></dc:creator>
            <pubDate>Sun, 24 Dec 2023 20:12:59 GMT</pubDate>
            <atom:updated>2023-12-24T20:20:54.941Z</atom:updated>
            <content:encoded><![CDATA[<p>In this blog I’ll discuss the following</p><ul><li>What is Routing</li><li>HTTP Request, Response</li><li>Endpoints, Parameters</li><li>HTTP Methods</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VljmoWa1k-7FkjQVgE1_tA.png" /></figure><h3>Introduction to Routing</h3><p>Routing is the heart of any web application, directing incoming requests to the appropriate destinations.</p><p>Take Google, for example. A single domain (‘google.com’) wouldn’t be sufficient for its vast array of services. This is where Routing comes into picture.</p><p>So when you visit ‘<a href="https://www.google.com/imghp">google.com/imghp</a>’ it redirects you to Google Images. Similarly, when you visit ‘<a href="https://google.com/maps">google.com/maps</a>’ it will redirect you to Google Maps. So you see, routing can be used to render different things in different locations.</p><p>But, Routing is far more complex than some redirections, Let’s start with basic terminologies and move on from there.</p><ul><li>By using different Routes we can make an <em>API</em>,<em> i.e.</em> our application.</li><li><strong>HTTP Request</strong>: It is a message send from client (such a web browsers) to a server, asking for resource or action.</li><li><strong>HTTP Response</strong>: It is the answer that the server sends back after receiving and processing the request. The request and response are core functionality of any API.</li><li><strong>Endpoint/Path</strong>: In the above Google example ‘/maps’ &amp; ‘/imghp’ are the endpoint or path.</li><li>‘<strong>/</strong>’ is the Entry point or base url in any website, for example ‘abc.com/’. It is also used as a path separator, for example ‘abc.com/genre/hip-hop/’.</li><li><strong>Parameters/Query</strong>: These are used to pass data to the server, more on this later.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*XR6c29rOgXNNjiQ535pdHQ.png" /></figure><p>HTTP Request data:</p><ul><li>There are different ways in which the data can be requested to the API, one of the most popular being <a href="https://www.w3schools.com/whatis/whatis_json.asp">JSON</a>.</li><li>And it can also be send using url parameters, they appear after a question mark (?) in the URL &amp; each parameter is separated by an ampersand (&amp;).</li><li><a href="https://api.example.com/products?category=electronics&amp;sort=price&amp;page=2">https://api.example.com/products?category=electronics&amp;sort=price&amp;page=2</a></li><li>In the above example the parameters are category=electronics, sort= price, page=2.</li></ul><p>Now you’ll be able to read &amp; understand almost any url, isn’t that awesome!</p><p>Here’s a little fun exercise, find parameters of following links and write your answer in the comment:</p><ul><li><a href="https://api.weather.com/data?location=NewYork&amp;units=metric&amp;apikey=YOUR_API_KEY">https://api.weather.com/data?location=NewYork&amp;units=metric</a></li><li><a href="https://api.movies.com/search?title=Inception&amp;year=2010">https://api.movies.com/search?title=Inception&amp;year=2010</a></li><li><a href="https://www.google.com/search?q=hi">https://www.google.com/search?q=hi</a></li></ul><h3>HTTP Methods</h3><p>There are different methods for requesting information from an API. The fundamental methods are GET &amp; POST.</p><p><strong>Get Request</strong></p><p>Imagine a waiter bringing you a menu to view available dishes. This is like a GET request, you’re requesting information (the menu) without changing anything on the server (the kitchen).</p><ul><li>It is used to retrieve information from a server without modifying any data.</li><li>Examples: Viewing a specific article from a news website.</li></ul><p><strong>Post Request</strong></p><p>POST request is like placing an order at a restaurant. You’re sending information (your order) to the server (the kitchen) to be processed</p><ul><li>Used to submit data to be processed to a specified resource.</li><li>Examples: Creating a new post on a social media platform.</li></ul><p><strong>Other HTTP Methods</strong></p><p>There are many other methods as well like ‘<em>put’</em> (which is used to update, for example updating a password) &amp; <em>‘delete’ </em>(pretty self explanatory).</p><p>There are certain architecture that industry follows one of the most popular being the REST (Representational State Transfer) API which has a fixed set of rules that you should follow for the API to be RESTful.</p><p><strong>HTTP Request Method Puzzle </strong>(Solutions Revealed Below)</p><p>Determine the appropriate HTTP request method (GET, POST, PUT, DELETE) for each situation:</p><ol><li>When a new user signs up on a website</li><li>When a user wants to change their email address in their profile</li><li>When a user adds a new item to their cart</li><li>When a user removes an item from their shopping cart</li><li>When a user searches for the current weather in a city</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6cjGAevnut9YuDmprV1Qmw.png" /></figure><h3>This is just a start</h3><p>This was only an introduction to routing, and the topic is too complex to be fully covered in a single tutorial or blog post. If you’re new to this field and looking to learn more, I have a few suggestions:</p><ul><li><strong>Learning a backend framework</strong>: This is the most obvious one, if you haven’t already then I’d suggest to start with express JS. It is easy to get started with, and it’s one of the most popular backend framework.</li><li>If you can read this article &amp; till the end, then you’re the chosen one &amp; you don’t need to watch tutorials. Learn the basics through documentation &amp; with some help of chatgpt, and start making projects.</li></ul><p>Remember, the best way to learn is by doing. So, don’t hesitate to get your hands dirty and start building your own routes and APIs. Happy coding!</p><p>And follow for more such high quality content.</p><p><em>Answers: POST, PUT, POST, DELETE, GET</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d3caa771823" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Collaborate on GitHub: A Beginner’s Guide]]></title>
            <link>https://medium.com/@dvippatel98/how-to-collaborate-on-github-a-beginners-guide-7456fdd69968?source=rss-b4b48ddf0606------2</link>
            <guid isPermaLink="false">https://medium.com/p/7456fdd69968</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[collaboration]]></category>
            <dc:creator><![CDATA[Dvippatel]]></dc:creator>
            <pubDate>Wed, 27 Sep 2023 15:29:49 GMT</pubDate>
            <atom:updated>2023-09-27T18:37:28.319Z</atom:updated>
            <content:encoded><![CDATA[<p>GitHub has become an essential tool for developers and teams working on projects together. It’s a platform that allows for seamless collaboration, version control, and easy tracking of changes in code.</p><p>In this guide, we’ll walk you through the process of collaborating on GitHub and explain how to avoid merge conflicts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*cfAkoOBmYeQ9TgrwJUMa0Q.png" /></figure><h3>Step 1: Forking a Repository</h3><p>Forking means creating a own copy of your repository that is owned by someone else. The changes that you make here are independent of the original repository and it allows to make changes without affecting the original project.</p><p>Open a repository and you’ll see a fork button on the top right corner of the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QeExK2g1UYrG-RIa3yC7Og.png" /></figure><h3>Step 2: Cloning the Repository</h3><p>Once you’ve forked a repository, you’ll want to clone it to your local machine. Cloning a repository means downloading a copy of it onto your computer.</p><p>You can use the git command,</p><blockquote><em>git clone &lt;url of gihtub repo&gt;</em></blockquote><p>for example:<em> git clone </em><a href="https://github.com/dvip1/Journeys"><em>https://github.com/dvip1/Journeys</em></a></p><h3>Step 3: Creating a new branch</h3><p>Before making any changes to the code, it’s a good practice to create a new branch. Branches are like separate workspaces where you can make changes without affecting the main project. This isolation is helpful because it prevents conflicts with the main codebase (I’ll come back to these conflicts).</p><blockquote>git checkout -b &lt;new-branch-name&gt;</blockquote><p>Here, ‘git checkout’ is used to switch between branches and the ‘-b’ tag creates a new branch if it doesn’t exists.</p><h3>Step 4: Making changes</h3><p>Now, you can start making some changes. Only make changes to the file that you’ve been assigned too, more on that later.</p><p>Once you’re satisfied with your changes, it’s time to push them back to your forked repository on GitHub.</p><h3>Step 5: Pushing the repository</h3><p>Pushing changes means sending your local changes back to the GitHub repository. Here’s how you can do it with Command Line Interface (CLI).</p><ol><li>Before you push your changes, you need to stage them. Think of this as getting your items ready for shipment. You can do it in different ways. Here are some examples below. <br>a. Staging one file -&gt;<strong> <em>git add file1.js</em></strong><em><br></em>b. Staging multiple files -&gt;<strong> <em>git add file1.js file2.py</em></strong><br>c. Staging all files -&gt;<em> </em><strong><em>git add .</em></strong></li><li>Commit Your Changes: Now, you’ll commit your changes, which is like labeling your package before sending it off.<br>-&gt; <strong><em>git commit -m “Your descriptive commit message here”</em></strong></li><li>Push to GitHub. : Finally, you’ll push your changes to your forked repository on GitHub. This is like sending your package for delivery.<br><em>git push origin &lt;new-branch-name&gt;</em></li></ol><h3>Stage 6: Sending a Pull Request</h3><p>After you’ve pushed your changes to your forked repository, it’s time to send a Pull Request (PR). Think of this as formally submitting your changes to the owner of the original repository for review and possible inclusion in the main project.</p><ol><li>Navigate to Your Repository on GitHub: Open your web browser and go to your forked repository on GitHub</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iTHc8ZjH5F3mTgXoONupTw.png" /></figure><p>2. Now, Click on the Pull Request.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WxD3N7P-Y00AvmjyOEFHbg.png" /></figure><p>Now click on ‘New Pull Request’ Button.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YdWHTLem20Bp-f8_-9oUyQ.png" /></figure><p>Change the ‘main’ branch to the new branch you’ve created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qP5MCZXXLew7nmFWmi0LTQ.png" /></figure><p>And finally, Click on ‘create pull requests’.</p><p>And that’s it! If the edits that you’ve made are good enough than your pull request will get accepted, you can read more about it here <a href="https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests">https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests</a>.</p><h3>Additional Tip!</h3><p><strong>Merge Conflicts: </strong>A merge conflict occurs when Git can’t automatically merge changes from different branches or contributors. This typically happens when two or more people modify the same part of a file. So, try to avoid that, and you’ll be fine. I can’t cover how to resolve merge conflict in a single article so let me know if you want to see that.</p><p>Thank You for reading! I hope I was able to help out. Comment Down below if you still have any doubt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7456fdd69968" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>