<?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 Shivam Shekhar on Medium]]></title>
        <description><![CDATA[Stories by Shivam Shekhar on Medium]]></description>
        <link>https://medium.com/@shvam0000?source=rss-65017dd302bf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*HFEEHBYY8Vu5NE_Q2VHm5w.jpeg</url>
            <title>Stories by Shivam Shekhar on Medium</title>
            <link>https://medium.com/@shvam0000?source=rss-65017dd302bf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 13:15:05 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shvam0000/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[How to deploy the NodeJs app using Heroku via GitHub.]]></title>
            <link>https://medium.com/@shvam0000/how-to-deploy-the-nodejs-app-using-heroku-via-github-a79a240ba4b8?source=rss-65017dd302bf------2</link>
            <guid isPermaLink="false">https://medium.com/p/a79a240ba4b8</guid>
            <category><![CDATA[github]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[heroku]]></category>
            <dc:creator><![CDATA[Shivam Shekhar]]></dc:creator>
            <pubDate>Fri, 25 Sep 2020 20:45:09 GMT</pubDate>
            <atom:updated>2020-09-25T20:45:09.989Z</atom:updated>
            <content:encoded><![CDATA[<p>In the world of budding great web and app devs, showcasing your work becomes very important. Creating the project and deploying it to present it in front of other people are two major and equally important steps in the process of development. Moreover, who doesn’t like to show off their work amongst their friends?</p><p>With the help of Cloud service providers, the process of deploying process has become very easy and smooth. So let’s dive into the process and deploy our app.</p><h3><strong>STEP 1. Create your app</strong></h3><p>Put your idea and get your hands on your favorite IDE and make your amazing app.</p><p>Create a folder on your local machine containing all the files required for your app.</p><p>Add a file with the name of “package.json” which will contain all the basic information of your package. This can be done using the command “npm init” and accepting all the default settings in your terminal/command line.</p><p>On opening your package.json file, it will look something very similar to this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/816/1*kKYk5ZPII96sKzlvKHi8FQ.png" /><figcaption>package.json</figcaption></figure><p>One very important point line to look is:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/751/1*5IEwDhhdFoBWSyvUtK8vpA.png" /></figure><p><strong>After deployment, Heroku will run this particular command to start your application.</strong></p><h3>STEP 2. Push to GitHub</h3><p>Now that we have completed making our app, we will upload our code to GitHub. This way, we will be able to change and edit our code from anywhere and deploy the committed changes to the cloud directly.</p><p>Let’s create a Repository on <a href="https://github.com/">GitHub</a> by clicking New Repository.</p><p>Give it a name, some description, and click Create repository:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/764/1*S7-dmZbgutJGFzGV7inqUQ.png" /><figcaption>GitHub new repository page</figcaption></figure><p>GitHub will create a repository and give you some commands that you can run locally so that you can clone your local folder with your GitHub repository.</p><p>In the command prompt, run below commands in this sequence.</p><ol><li>Initialize the Git repository at the root level:</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*TVBoxqad1C3fVFHiuLJiCA.png" /></figure><p>2. Add all the files to your local Git (staging). Notice the last dot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*QC8rXMI_mBlkccBPWU8f9A.png" /></figure><p>3. Commit your changes to your local Git:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*zaAbNbNssn91yVerYqO--A.png" /></figure><p>4. Link to your GitHub repository. (Please change the URL to point to your repository.)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/829/1*QhLqXkeyl7_LA31ib6Olgw.png" /></figure><p>5. And push your change:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*_kRkQTt1v5APHyrWpAyNAg.png" /></figure><p>Great! Your code has been uploaded on your GitHub repository, refresh the GitHub page and there you go!</p><h3>STEP 3. Deploy to Heroku</h3><p>Now comes the fun and the important part, deploying your app.</p><p>If you don’t have an account with Heroku, you can open a free one by filling out this <a href="https://signup.heroku.com/login">simple form</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/589/1*rJE5AhXuM--udammDyiPXQ.png" /><figcaption>Heroku signup page</figcaption></figure><p>Once you have your account ready, log in with your credentials.</p><p>Click New on the top right corner and select “Create new app”.</p><p>Give your app a name (This will be included in the public URL for your application) and click Create app.</p><p>This step will take you to the dashboard of your app. Open the Deploy tab and scroll to the “Deployment method” section.</p><p>Select GitHub as the method.</p><p>It will show a “Connect to GitHub” option where we can provide our GitHub repository. If you are doing it for the first time, Heroku will ask permission to access your GitHub account.</p><p>Here, you can search for your GitHub repository and click connect:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*Lz3-L8jeJ6iVfWqeMRUxGQ.png" /></figure><p>If it’s able to find and connect to the GitHub repository, the Deployment section will show up where you can select if you want Automatic Deployment (as soon as the changes are pushed to GitHub, Heroku will pick them up and deploy) or Manual Deployment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*EousUUEMn-j169hVtI0hbw.png" /></figure><p>Click Enable Automatic Deploys (because it’s less overhead for demo apps :) ). You can also select the GitHub branch if you need to, but for this demo, we will deploy from the master branch.</p><p>Now we need to tell Heroku that our app is a NodeJs app. For that, we will need the NodeJs build back.</p><p>Open the Settings tab and locate Buildpacks and click <strong>“Add buildpack”.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/785/1*bHUi2CgOQNC8uuB1WxpqHg.png" /></figure><p>Select <strong>nodejs </strong>from the options and click Save changes.</p><p>Now, go back to the Deploy tab, and click <strong>Deploy Branch</strong> at the bottom.</p><p>Heroku will take the code and host it. Open the Activity tab and there you can see the progress.</p><p>And that’s it!</p><p>Open the <strong>settings</strong> tab and scroll down to the <strong>Domains and certificates </strong>section. Here, you can see the URL of your app that was just deployed. Copy and paste that URL in the browser and… Hoorah!!</p><p>We just created our own web application that can be accessed over the internet.</p><p>Great!</p><p>Please go ahead and share it with others!</p><p>Happy coding! :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a79a240ba4b8" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>