switchon@lavalamp.biz
australia flag +61(0) 42 420 8911
south africa flag +27(0) 21 036 1165
Application & software development
Get A Quote

  • Home
  • Services
    • Application & software development
    • Outsourced software development
    • Project based resourcing
    • Digital marketing & consulting
    • Graphic design & consulting
    • UI / UX design & consulting
    • Recruitment services
    • Lease an expert
  • About
    • NBConsult Group
    • Partners
    • Lightbox Digital
  • Blog
  • Join us
  • Contact

  • Home
  • Services
    • Application & software development
    • Outsourced software development
    • Project based resourcing
    • Digital marketing & consulting
    • Graphic design & consulting
    • UI / UX design & consulting
    • Recruitment services
    • Lease an expert
  • About
    • NBConsult Group
    • Partners
    • Lightbox Digital
  • Blog
  • Join us
  • Contact

  • Home
  • Services
    • Application & software development
    • Outsourced software development
    • Project based resourcing
    • Digital marketing & consulting
    • Graphic design & consulting
    • UI / UX design & consulting
    • Recruitment services
    • Lease an expert
  • About
    • NBConsult Group
    • Partners
    • Lightbox Digital
  • Blog
  • Join us
  • Contact
switchon@lavalamp.biz
Get A Quote

  • Home
  • Services
    • Application & software development
    • Outsourced software development
    • Project based resourcing
    • Digital marketing & consulting
    • Graphic design & consulting
    • UI / UX design & consulting
    • Recruitment services
    • Lease an expert
  • About
    • NBConsult Group
    • Partners
    • Lightbox Digital
  • Blog
  • Join us
  • Contact

  • Home
  • Services
    • Application & software development
    • Outsourced software development
    • Project based resourcing
    • Digital marketing & consulting
    • Graphic design & consulting
    • UI / UX design & consulting
    • Recruitment services
    • Lease an expert
  • About
    • NBConsult Group
    • Partners
    • Lightbox Digital
  • Blog
  • Join us
  • Contact
8 mistakes businesses make when building a new website
8 Tips For Businesses Building A New Website
March 29, 2021
benefits of developer journal
5 Benefits Of Having A Developer Journal
April 16, 2021

How To Deploy Your App/Website On Heroku

how to deploy your app/website on heroku
how to deploy your app/website on heroku

 

Introduction

What is Heroku? Heroku is a fully managed container-based cloud platform, to make it easy for you to run apps written in a variety of programming languages, so in plain english, it mean you can run and deploy applications written in virtually any language, wether that be PHP, Node.js, Scala, Java or even just a simple html and css website you can do it.

Heroku also includes a free tier which is great for exploring the platform and I like to use it to run my personal portfolio projects. If you want something a bit “Beefier” meaning more power, they have other tiers that are quite affordable when comparing to services such as AWS for hosting.

 

Setup and Deployment

Fortunately setup and deploying your web application is crazy easy to do and according to their website you could do it in less than 10 seconds, which I can certainly agree with.

We will be using a typical Node.js Application but their documentation covers all the 1st class languages, such as PHP, Scala, Java, Ruby, Go, Closure, and of course Python.

To get started, we need to use the Heroku CLI, which they call the Heroku Toolbelt, its as simple as installing with

npm install -g heroku, preferably install the Toolbelt via the Heroku installer for Windows or using a services such as Homebrew for mac users, as npm won’t auto update the toolbelt when updates arrive, but for the purpose of this blog, the npm method is fine. For the official install documents take a look at Heroku CLI Documentation

Okay, so now we have heroku toolbelt(cli) installed we can now begin with deployment, first there are some prequites for our application which are:

Prerequisites

Node.js and npm installed.

  • an existing Node.js app.
  • a free Heroku account.
  • the Heroku CLI.

Make sure you have a package.json file ready and all its dependancies listed.

We need to add one important file which is the Procfile, this is a reserved file name for Heroku, and it basically tells heroku what type of application you are running and how to run it.

to do this is very simple, just add a file called “Procfile” spelled exactly as mentioned and add “web: node app.js” , and that’s it.

Deploy your application to Heroku

After you commit your changes to git, you can deploy your app to Heroku.

$ git add .
$ git commit -m "Added a Procfile."
$ heroku login
Enter your Heroku credentials.
...
$ heroku create
Creating arcane-lowlands-8408... done, stack is cedar
http://arcane-lowlands-8408.herokuapp.com/ | git@heroku.com:arcane-lowlands-8408.git
Git remote heroku added
$ git push heroku main
...
-----> Node.js app detected
...
-----> Launching... done
       http://arcane-lowlands-8408.herokuapp.com deployed to Heroku

To open the app in your browser, type heroku open.

And your app is now running in a Heroku dino which is their term for a container. Every time you want to redeploy, just use git push heroku main.

Conclusion

Installing heroku and setup and deployment is very simple and heroku can support any web language, so its very convenient. and its free tier although is a bit slow and should not be used for an application that is expecting any traffic, its great to explore the services and to run basic applications for demo’s for example.

I typically use a combination of Heroku and Firebase to host my backend Restful api and frontend respectively. and I believe this helps with load time and performance. if you are interested in learning how to host a static frontend application, check out my other article “Deploy Static frontend sites instantly and for free with Firebase“

 

Contact us


    Related posts:

    how to setup git-ftp for windowsHow To Setup Git-ftp For Windows how to send a tweet from within your angular app via node jsHow To Send A Tweet From Within Your Angular App Via Node Js how to deploy a backend api to azureHow To Deploy A Backend API To Azure angularUpdating A Primitive Type Variable From A Service In Angular
    Share
    24
    Mitchell Yuen
    Mitchell Yuen

    Leave a Reply Cancel reply

    Your email address will not be published. Required fields are marked *

    lava lamp lab secondary logo white

    Like technology, a lava lamp constantly changes form, producing new conditions with every passing moment


    lava lamp lab facebook   lava lamp lab twitter   lava lamp lab linkedin   lava lamp lab instgram

    Services

    • Application & software development
    • Outsourced software development
    • Project based resourcing
    • Digital marketing & consulting
    • Graphic design & consulting
    • UI/UX design & consulting
    • Recruitment services
    • Lease an expert

    Contact Us

    south africa+27(0) 83 419 4851

    south africa+27(0) 21 036 1165

    australia+61(0) 42 420 8911


    switchon@lavalamp.biz


    Lava Lamp Lab,
    Unit 1 Monaco Square, 14 Church Street, Durbanville, Cape Town, 7550

    NBConsult Group

    nbconsult
    designer needed
    © 2023 Lava Lamp Lab (Pty) Ltd | All Rights Reserved | Privacy Policy
        Business Automation

        Business-specific workflows assist our clients with Disaster recovery, time tracking and invoice generation, to mention a few. If you choose to outsource your enterprise app development, we work with you to understand your business and assist to deliver automation for great business efficiency.

        eCommerce Solutions

        We are industry experts in Fintech and eCommerce, Lava Lamp Lab will help you with custom software development to provide you with the quality software services for creating online shops, Fintech mobile apps and web presence for your business of any size, allowing you to engage, sell, support and collect payments.

        Startup & Innovation

        Lava Lamp Lab believes in helping you grow your idea into a business. Our team has provided outsourced services to multiple tech start-ups and investors over the last decade, delivering innovative solutions. We have been trusted over other software development companies to build their entire technology stack.

        Data Mining

        Key to any business is the processing of websites and social network APIs, aligning the information gathered to information collected from internal enterprise systems. This big data can be rendered on reporting dashboards to create Business Intelligence. You can entrust Lava Lamp Lab to reliably deliver on this.

        Contact us now

          Application & software development

            Outsourced software development

              Project based resourcing

                Digital marketing & consulting

                  Graphic design & consulting

                    UI/UX design & consulting

                      Lease an expert

                        Recruitment services

                          We are using cookies to give you the best experience on our website.

                          You can find out more about which cookies we are using or switch them off in .

                          Lava Lamp Lab
                          Powered by  GDPR Cookie Compliance
                          Privacy Overview

                          This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

                          Strictly Necessary Cookies

                          Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

                          If you disable this cookie, we will not be able to save your preferences. This means that every time you visit this website you will need to enable or disable cookies again.

                          3rd Party Cookies

                          This website uses Google Analytics to collect anonymous information such as the number of visitors to the site, and the most popular pages.

                          Keeping this cookie enabled helps us to improve our website.

                          Please enable Strictly Necessary Cookies first so that we can save your preferences!

                          Cookie Policy

                          More information about our Cookie Policy