In this blog post I will be expanding my previous experience of developing a web app.
Now that all of the unit testing is done, it is finally time to go online! This is probably the most existing part of the web, getting other people to try your work. Moreover, since my project is completely Open Source, someone might find it interesting and start contributing to my code with ease (thank you Travis).
First things first, I want my service to be running all the time, so using an Apache sever on my box will be unwise. So instead, I am going to use one of the hosting services – Heroku. There are a lot of other options out there like Amazon Web Services, Firebase etc., some of them might be way better than my choice, however it is free be default, it has a nice console API integrated with Git, and it was required for me to use.
After registering with Heroku, I needed to push my server code to their repo. By the way, I am running node based sever called Express. It is really fast and simple, which makes it ideal for one page apps like mine. So going back deployment, after installing Heroku console tool and logging in with my account, I needed to ask Heroku for a spot, where my code will be running, that could be done with a simple
command. It generates a random name for app and adds it to the list of my remotes. The only thing it left for me to do is just push to that remote and Voila!
Finally, I could start my server with the
heroku ps:scale web=1
Here is the link to my final implementation: https://aqueous-wave-68137.herokuapp.com/healthcheck
To conclude, I expected app deployment to be some sort of black magic, where you needed to connect a bunch of sub-services together, but it turned out pretty well.