node.js

swagger, describing an express REST API

Wednesday March 26, 2014     node.js, express, swagger, express-validation

Swagger is a simple, open standard for describing REST APIs. Below is my take on creating a swagger client for node.js and express. The solution does not require comments…

import data into mongodb via grunt

Wednesday March 26, 2014     node.js, mongodb, grunt

The following grunt plugin allows you to configure and import data into mongodb. I have found this useful for seeding data during development and when running integration and end-to-end tests.…

testing angular end-to-end with protractor and cucumber

Saturday March 22, 2014     node.js, selenium, bdd, angular.js, protractor, cucumber

protractor is an end-to-end testing framework for angular applications; cucumber lets software development teams describe how software should behave in plain text. protractor-cucumber protractor-cucumber allows one to drive protractor tests…

unit testing node.js, stubbing dependencies using sinon

Monday March 10, 2014     node.js, testing, sinon

This post will demonstrate how to unit test node.js modules by mocking/stubing dependencies using sinon. Unit testing node.js is actually very simple once you know how. Code…

validating express requests

Friday February 21, 2014     node.js, express, validation

This post demonstrates a module I have put together for validating a request passed to an express route. express-validation express-validation is a middleware that validates the body, params, query, headers…

Advanced Express Web Application Development

Sunday November 24, 2013     node.js, express

My new book http://www.packtpub.com/advanced-express-web-application-development/book is now available to pre-order. The book is a practical book, guiding the reader through the development of a single page…