Mikael's blog

A developers sixth time trying to maintain a blog

Posts tagged with #nodejs
Async File Uploads in HTML5
Uploading files using HTML forms has always felt a bit off for me. You had to set your encoding to `multipart/form-data` and the synchronous nature of form posts always made it a waiting game when uploading larger files. Then came AJAX and the dawn ...
written on May 1, 2013 at 22:30 by Mikael Lofjärd
LESS Is More, More Or Less
A while back I read a blog post somewhere about how the LESS parser/compiler had been remade in Javascript. "Well awesome", I thought to myself as I had been wanting some more flexibility in CSS but had been to stubborn/proud to install the SASS com...
written on March 9, 2012 at 00:05 by Mikael Lofjärd
Cache Me If You Can
Today at work was "do-anything-but-work-day". It's a bit like Googles 20%, but instead of 20% it's more like .8% or something like that. It's was our first time and not that many people had a clear idea about what to do at first. I on the other hand...
written on March 6, 2012 at 23:30 by Mikael Lofjärd
The Development Environment Enigma
As you might have noticed, there hasn't been much work done on the blog these last few months. It kind of boils down to complexity. When I started building this blog my main workstation was running Windows 7. Everything ran as well on Node.js on W...
written on March 3, 2012 at 11:22 by Mikael Lofjärd
Content-Length - A HTTP Header/UTF-8 Story
The HTTP protocol has a lot of header fields that affects requests and responses. HTTP also have a couple of different request types (HEAD, GET, POST, PUT and DELETE). Unless you're building a REST service, you mostly have to deal with GET and POST o...
written on January 27, 2012 at 15:01 by Mikael Lofjärd
The Gift of Source Code
I'm not sure if anyone is interested in my source code for this blog, but since I've already posted some bits and pieces of it from time to time, I thought, why not release it all? If your browser has a width of more than 720 pixels, you will see a ...
written on December 21, 2011 at 17:00 by Mikael Lofjärd
Handling Views in node.js
This weekend, my wife and daughter have been away up north, visiting my in-laws. I thought this would be a great opportunity for me to buffer up on some blog posts, but it seems like my inspiration mostly left with them. Last Tuesday at my weekly tu...
written on December 3, 2011 at 22:46 by Mikael Lofjärd
Automatic Minification and Bundling with node.js
Scott Guthrie recently wrote about the new minification and bundling process that has been built for ASP.Net 4.5. I read his blog post, liked what I read and then I though of doing the same thing for my blog. I've been looking at minification progra...
written on November 29, 2011 at 22:51 by Mikael Lofjärd
A Simple Routing Solution with Node.js
A few days ago I wrote about not reinventing the wheel. Today I'm going to talk about the opposite. If you're building an 'enterprise' grade application, reinventing the wheel is almost always the wrong thing to do. This blog however is something I ...
written on November 25, 2011 at 23:27 by Mikael Lofjärd
Node.js Development Server Strategy
When I started building this blog my server was the production environment and my laptop was the development environment. This all changed when I added the database and started doing more UNIX specific stuff such as path resolving and such. So from t...
written on November 24, 2011 at 18:28 by Mikael Lofjärd
Why node-static is a good idea
If you are using node.js as a web server (as I am) and you want to serve up static files there are a lot of ways you can go about doing that. I'm going to talk about 3 of them. It's really easy to do this for a proof of concept. Node.js has an eas...
written on November 22, 2011 at 22:40 by Mikael Lofjärd
Node TCP Client
A few weeks ago I bought an iTach IP2IR from a company called Global Caché. Combined with an iPhone app called iRule it lets me use my iPhone to control my home theater equipment. This has been an awesome experience. No more fighting over remotes si...
written on November 22, 2011 at 01:38 by Mikael Lofjärd
The power of CommonJS
A few days ago when I was putting my posts into CouchDB, instead of relying on a static HTML file, I also implemented templating with Mustache. Mustache is small, easy to use and has almost no advanced features. It's power lies in the vast amount of ...
written on November 16, 2011 at 23:44 by Mikael Lofjärd
Double linked paging in CouchDB
Yesterday I said that I would look into paging, as my post count had reached 10+, so that's what I did today. Paging in CouchDB isn't all that straight forward for a bunch of reasons that I'll try to explain. Firstly, to be able to query anything i...
written on November 15, 2011 at 00:56 by Mikael Lofjärd
Notes from Øredev
As you know, I went to the Øredev conference in Malmö, Sweden last week. It was a great conference and I saw a lot of great speakers talk on a lot of great topics. The first two days of Øredev were "workshop" days. On monday we ha...
written on November 13, 2011 at 18:29 by Mikael Lofjärd
Experimental server is up
I've put up a node test server running on port 1337 (it was already forwarded to my server for reasons forgotten by me) and I configured node-static to take care of all my static files. If you want give it a go, head to http://www.lofjard.se:1337 (E...
written on November 4, 2011 at 21:52 by Mikael Lofjärd