Open Source Tooling : Deploying to Heroku

Heroku is a tool available to try for free at www.heroku.com . It allows for developers to put up server code that they can then share with anyone. This is an extremely useful tool when it comes to working in the open source community and sharing projects with team mates and friends. All you need to do in order to get started is create an account, and install the CLI application to allow heroku to automatically sync with your git repo.

When I first tried it I extended the code I wrote in the last lab to be able to be ran on express server. Express allows you to easily make your JS code accessible with a server. To merge the express server and heroku cloud service, we have to add a couple of things to our code. One of them is a file named Procfile, all it contains is information on what server we want to use, in this case it’s web: node server.js.

Once everything is set up and running you simply push your git changes to the automatically created heroku git repo. Once its up it would be running on the web with the url it provided. You can check out my server at : https://infinite-earth-38198.herokuapp.com/

This is what it looks like when passing some parameters to trigger a function, for example healthcheck :

healthcheck.PNG

Overall this was a great lab and it taught me an easy way for me to code a server and share it with people I am working with. If you ever think you may need to do some simple servers or test code for your application and want to share it online, check out Heroku! Only takes about 10 min to learn. That’s it for today, have a great one.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s