Creating an Image Proxy server in Node.js

This will be a short post. I am writing this to document how I created a Node.js server that can act as an image proxy. I needed this to get around a limitation in HTML5's canvas implementation that prevents getting a loaded image's binary data if that image is from a different web domain. This function is very handy though if you're building an image editor so I had to find a work around.

My solution is to create an image proxy on the web server in question. I pass the url of the image I want to a specific route on my server and then it downloads the image data and returns it to my javascript thus hiding its true origins.

Read the rest of this post »

Why I'm (Finally) Switching to CoffeeScript

CoffeeScript Misconceptions

You may have already heard about CoffeeScript and some of the hype surrounding it but you still have found several reasons to not make the switch. This blog post is for you. Here are some of the reasons I held out for so long:
  • I wanted to understand Javascript and just didn't see how using a "simpler version" (my own thoughts) would make my life easier in the long run.
  • If I DID use an intermediate language, I wanted to be able to dump it at any time and not feel like I was forced to continue using it.
  • Putting one more thing with bugs in between myself and my code seemed fool hardy.

Read the rest of this post »