Why does the JavaScript need to start with “;”?

I have recently noticed that a lot of JavaScript files on the Web start with a ; immediately following the comment section. For example, this jQuery plugin’s code starts with: /** * jQuery.ScrollTo * Copyright (c) 2007-2008 Ariel Flesler – aflesler(at)gmail(dot)com | http://flesler.blogspot.com * Dual licensed under MIT and GPL. * Date: 9/11/2008 …. skipping … Read more

Node.js and CPU intensive requests

I’ve started tinkering with Node.js HTTP server and really like to write server side Javascript but something is keeping me from starting to use Node.js for my web application. I understand the whole async I/O concept but I’m somewhat concerned about the edge cases where procedural code is very CPU intensive such as image manipulation … Read more

user authentication libraries for node.js?

Are there any existing user authentication libraries for node.js? In particular I’m looking for something that can do password authentication for a user (using a custom backend auth DB), and associate that user with a session. Before I wrote an auth library, I figured I would see if folks knew of existing libraries. Couldn’t find … Read more

nodejs vs node on ubuntu 12.04

I installed nodejs on ubuntu from instructions given here When I write node –version in the terminal I see this : -bash: /usr/sbin/node: No such file or directory I can see node in the /usr/sbin/ directory, though. Writing npm –version shows 1.3.5 Writing nodejs –version shows v0.10.15 Also, I can see node in the /usr/bin/ … Read more

Node.js Best Practice Exception Handling

I just started trying out node.js a few days ago. I’ve realized that the Node is terminated whenever I have an unhandled exception in my program. This is different than the normal server container that I have been exposed to where only the Worker Thread dies when unhandled exceptions occur and the container would still … Read more