1.0 is here

Exciting times for node.js and websockets.

The 1.0 release of is out and its looking good. I blogged back in 2013, wondering what was happening with as it was looking very quiet, but thats all in the past and is back with a vengeance.

Check it out on the site

Posted in Uncategorized | Tagged , | Leave a comment

WordPress on Heroku behind a reverse proxy

I’ve just been setting up the blog for Big5 Boutique

I thought I’d share the useful sources of info  I found to do this:

I set up the WordPress blog under the /blog/ subdirectory of the main Rails app and set up the rack-reverse-proxy to serve up the blog. Two issues to be aware of:

  1. Rack Deflater wasn’t able to serve up the WordPress css files.
  2. The WordPress visual editor gets disabled because WordPress tries to sniff the user agent but since the requests are reverse proxied, the browsers user agent isn’t coming through. Thankfully this blog article explains why this is happening and how to fix it.




Posted in Uncategorized | Tagged , , , , , | Leave a comment

Big5 Boutique is live!

Last Friday we pushed Big5 Boutique live. We want to make the whole process of booking safaris much simpler and we are very excited about everything we’re going to be building over the next few months. Please do check it out

Exciting days for the B5B team!

Posted in Uncategorized | Tagged , , , , | Leave a comment

Trying out Big5 Boutique

We’ve got the beta version of Big5 Boutique up at our staging url,

We’re not quite ready to launch yet but we’re getting close. Next step to start learning about SEO.. Its quite the rabbit hole to go down.

Posted in Uncategorized | Leave a comment

Executing a transaction against a stored card in Peach Payments with node.js

Integration with Peach Payments has been going well but they still don’t have any code samples for integration using Node.js

In my previous post I showed how you can get the URL for an iFrame point at their Web Payment Frontend. You can use that to allow your customers to store their cards with Peach Payments. Once you’ve done that and got a unique id for the stored card its pretty easy to do single click transactions using their POST interface.

Heres a snippet showing how to do it from Node.Js

Posted in Uncategorized | Tagged | Leave a comment

Integrating to Peach Payments

I’ve been writing some code to integrate to Peach Payments. They’re a great payment provider for developing markets. Unfortunately their API documentation is missing details on how to retrieve the url for their WPF integration using node.js

So here is a simple code snippet showing how you can retrieve a WPF url using Node.js. I find it a bit easier to grok than their PHP example.

Posted in Uncategorized | Tagged , | Leave a comment

Security risk in an Expressjs app with Passportjs authentication

I was recently reading this blog post about the dangers of using the bodyParser middleware in the Express server. This warning is actually echoed in the Express guide. The problem basically boils down to the fact that bodyParser creates a temp file on your server for every request leaving you wide open to a DDOS attack. Get the details from the article though.

I was interested to see that the getting started guide for Passportjs actually uses suggests the use of the bodyParser middleware. This is quite possibly the de-facto authentication solution for Node.js app which means there might be a lot of vulnerable apps out there.

Luckily for me the solution was easy. I’m using the local authentication strategy and was able to replace my call to app.use(express.bodyParser()); with app.use(express.urlencoded());






Posted in Uncategorized | Tagged , , , , , , , | Leave a comment

PhantomJS and Nodejitsu

I’ve been trying to find information on whether nodejitsu supports PhantomJS or not.

The short answer as of 04/Oct/2013 is NO. 😦

If you try to access phantomjs from your node app, you will find that it is not installed.

If you try to install it using the phantomjs npm module, then you get a 500 error when you try to deploy your app.

However, seem to support PhantomJS according to this article so I’ll give that a go.

Posted in Uncategorized | Tagged , , , | Leave a comment

Node.js native MongoDB driver is re-usable across requests

I’m still getting to grips with MongoDB and Node.js.

One thing that I’ve been wondering about is whether the connection supplied by the javascript native MongoDB client is re-usable across requests with some kind of pooling implementation…and the answer is yes!

Posted in Uncategorized | Tagged | Leave a comment

Don’t let Ember.js swallow errors in your promises

Update: 25/07/2013 : The solution described below does not work with RC6 .. You will need to get ember-latest.

Are you finding that errors occurring in your promise handlers are being swallowed silently by Ember.js ? I had written some code that looked like this:

The problem was that I was calling this.getXXX while in the scope of the then() function, which is globally scoped. This was easily fixed by passing a reference to controller scope, but normally these kind of mistakes are logged to the console.

Turns out the then() callback function was being executed by Ember.js in a try/catch block, with the error being passed to the default reject handler which was swallowing the error.

Luckily @teddyzeenny was in the IRC channel to offer some advice. Heres a code snippet that you can add to your Ember.js application to make sure these errors get logged to the console.

Posted in Uncategorized | Tagged , , , , , , , | 8 Comments