DevOps Zone is brought to you in partnership with:

I’m a passionate web application developer and Ruby on Rails enthusiast. I love building stunning web applications and working with interesting people. I feel comfortable developing on the frontend as well as on the backend and I have a firm grasp of JavaScript and HTML5. In general I like being involved in many aspects of a product and to figure out perfect technical solutions for everybody’s satisfaction. Clemens is a DZone MVB and is not an employee of DZone and has posted 10 posts at DZone. You can read more from them at their website. View Full User Profile

Testing Tuesday #20: Continuous Deployment for Node.js Applications

  • submit to reddit

This is the 20th Testing Tuesday episode. Every week we will share our insights and opinions on the software testing space. Drop by every Tuesday to learn more! Last week we started testing Node.js applications with Jasmine.

How to Deploy a Node.js App to Heroku

In this screencast we’ll deploy a very simple Node.js web application to Heroku continuously with the help of the Codeship.

Disclaimer: We show a lot of the Codeship in this screencast – that’s because we use it and because we build it. There are certainly other ways to continuously deploy Node.js applications. This is how we do it.

By Continuous Deployment we mean that every change to our application gets deployed immediately, if our application still works. To prove that our application still works, we’ve got tests in Jasmine, a JavaScript testing framework. Want to know more about Jasmine? There’s more on it in this Testing Tuesdays episode.

After we created a Heroku application and set up a Codeship project, the Codeship will take care of the rest: Whenever we push a new version of our app to GitHub, it will pick it up, run the Jasmine tests for us and deploy the application if everything works.

This way we can safely push every change to our application. If our tests succeed, our changes go live. Otherwise the build will fail and we’ll have to fix the bugs.

Special thanks go to Modulus for their excellent blog post “An absolute beginner’s guide to node.js”. We used the post’s example web app in this screencast.

Up Next Testing Tuesday: Testing JavaScript with QUnit

Next week will be the last Testing Tuesday episode for this season. We’ll talk about QUnit and how it compares to Jasmine. If you’ve got any questions or suggestions, please leave a comment!

Further info:



Published at DZone with permission of Clemens Helm, author and DZone MVB. (source)

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)