Mar
25
2012

Writing a first Node.js application on Windows

Plage de la Grande Anse du Diamant

I started some weeks ago to play with Github Hubot and hosted one version on Heroku to start learning about all those new technologies.

The next step was to go a bit onto Node.js and write a first small application.

First you need to download Node.js and install it on your machine. I downloaded the Windows version 0.6.14.

When Node.js is installed on your machine you should find it on the folder C:\Program Files (x86)\nodejs for 64 bits machines and on C:\Program Files\nodejs for the 32 bits.

Then start a PowerShell window and type “node -v” you should see v0.6.14.

Now start you preferred text editor and create a new file server.js and copy paste the code from the home page of Node.js

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(1337, '127.0.0.1');
console.log('Server running at http://127.0.0.1:1337/');

Go back to your PowerShell window and type “node server.js” which should display “Server running at http://127.0.0.1:1337/

Now run your preferred browser and enter the url http://127.0.0.1:1337/

nodejs

I went a little further following the Node Beginner site and created a first module.
To do so I used JetBrains WebStorm 3 which you can easily configure to run and debug your Node.js application.

You need to configure it this way

nodejs2

Then you can add a Run/Debug configuration for Node.Js

nodejs3

Finally you can run your Node.js application in Debug mode

nodejs4

and for sure hit the breakpoints and watch the values of your variables

nodejs5

Which will help during my learning of this new technology!

Mar
22
2012

Installation and first experience with the Ergotron WorkFit-D

New Ergotron Workfit-D desk

In late 2010 I reworked my home office and installed a new Ergotron LX Dual Side-by-Side Arm, to gain some place on my desk.

Some months ago, after different discussions with my colleague Bojan I decided to go on and try to find an height adjustable desk, which he just installed in his home office. I didn’t quite like his one because it was with an electrical motor and I prefered to find a mechanical one. It started to be important for me to stand during the day/night that I spend in front of a computer. I have back pains since years, and it is really time that I do something about it. You might read more about the topic on “JustStand.org” or on “Sitting is killing you”.

I also wanted to have something which fits nicely with my LX Dual Side-by-Side Arm and finally I found what I was looking for; the WorkFit-D, Sit-Stand Desk from Ergotron.

Here is the impressive packaging I received

Ergotron WorkFit-D

And what was inside the box

Ergotron WorkFit-DErgotron WorkFit-DErgotron WorkFit-DErgotron WorkFit-DErgotron WorkFit-D mounting

The mounting documentation was really easy to follow and after almost an hour I had my new Ergotron WorkFit-D assembled and my LX Dual Side-by-Side Arm with it’s two 24 inches monitor mounted on it. As for the mounting of the arm there was really nothing that I disliked during the mounting, easy and clear.

Ergotron WorkFit-D mountingErgotron WorkFit-D mountingErgotron WorkFit-D mounting

So over the past month, I had the chance to use this new working environment while working from home.

First of all I tend to use more the LX Dual Side-by-Side Arm to adjust my monitors when I change from standing up to sitting or the opposite. Before on the fixed desk with the chair, the arm saved quite some place on the desk, so I didn’t had really to move them when I needed to do something else then being on the PC. This is really easy and fast with the arm.

Going from the sitting position to the standing is really fast, smooth and easy. I just have to deal better with the cables behind which sometime cause problem, but I think I have a solution which I will try by end of this week. I was quite surprise that it was that easy, because the two monitors aren’t that light weight.

I used at the beginning the Neo-Flex® Underdesk Keyboard Arm to have my wireless keyboard and mouse. But I stopped at the moment because the whole set was shaking too much when I was typing. I still need to fine tune the foots of the WorkFit-D, which I think will improve the stability and reduce the shaking.

What was a surprise to me was the speed at which I went from a whole day sitting to almost a whole day standing. It took me less than a month. For example today I worked the whole day standing. I still have some pain in my legs after a full day but I think it improves slowly.

During Christmas I worked with my brother Mathieu on our new personal project and we found that it was a fantastic setup for pair programming.

So, I like very much my new Ergotron WorkFit-D and the LX Dual Side-by-Side every day and night I am working home.

Here are some more pictures

I still have some work to do to have my home office the way I want it, but this is work in progress.

Disclaimer: I was provided these materials free, so my opinion might be biased.

About Laurent

Laurent Kempé

Laurent Kempé is the editor, founder, and primary contributor of Tech Head Brothers, a French portal about Microsoft .NET technologies.

He is currently employed by Innoveo Solutions since 10/2007 as a Senior Solution Architect and certified Scrum Master.

Founder, owner and Managing Partner of Jobping, which provides a unique and efficient platform for connecting Microsoft skilled job seekers with employers using Microsoft technologies.

Laurent was awarded Most Valuable Professional (MVP) by Microsoft from April 2002 to April 2012.

JetBrains Academy Member
Certified ScrumMaster
My status

Twitter

Flickr

www.flickr.com
This is a Flickr badge showing public photos and videos from Laurent Kempé. Make your own badge here.

Month List

Page List