Hi, my name is Lee.
I'm a technical trainer,
a developer and an entertainer.
I create fixes and I fix headaches...
Welcome to my tech blog.
Nov 11th, 2012

Always use semicolons in JavaScript

According to Javascript; the semicolon after a statement (for example a function), is optional. However, it’s much better to end your line with a semicolon. A validator like JSLint for example, will throw a warning, even though the browser won’t [...]

Read More...
Category: JavaScript
Apr 17th, 2012

Node Connect example

The example below can be easily replaced with Node Connect. Just with a few lines. app.js

Now install Connect:

app.js

Read More...
Category: JavaScript, Node JS
Apr 9th, 2012

Hello World with Node.js

See the example below for an easy Hello World example with Node.js. Create a Node.JS server and serve a hardcoded response, with content-type: “text/html”. And listen to localhost:8000 in your browser to see the result. In your project folder create [...]

Read More...
Category: JavaScript, Node JS
Apr 9th, 2012

Auto restart node after code changes

When you are sick and tired of restarting your node app in the terminal (CTRL+C) on every code change you make then you can automate this process. Actually it’s really simple. Install Nodemon via the package manager.

When you [...]

Read More...
Category: JavaScript, Node JS