Using a .NET DLL in Node.js / serverside javascript

Check out the edge.js project I started (http://tjanczuk.github.com/edge). It provides a mechanism for running .NET and node.js code in-process. Edge.js allows you to call .NET code from node.js and node.js code from .NET. It marshals data between .NET and node.js as well as reconciles the threading models between multi-threaded CLR and single threaded V8. Using … Read more

user authentication libraries for node.js?

If you are looking for an authentication framework for Connect or Express, Passport is worth investigating: https://github.com/jaredhanson/passport (Disclosure: I’m the developer of Passport) I developed Passport after investigating both connect-auth and everyauth. While they are both great modules, they didn’t suit my needs. I wanted something that was more light-weight and unobtrusive. Passport is broken … Read more

What is non-blocking or asynchronous I/O in Node.js?

Synchronous vs Asynchronous Synchronous execution usually refers to code executing in sequence. Asynchronous execution refers to execution that doesn’t run in the sequence it appears in the code. In the following example, the synchronous operation causes the alerts to fire in sequence. In the async operation, while alert(2) appears to execute second, it doesn’t. Synchronous: … Read more

nodejs vs node on ubuntu 12.04

You need to manually create a symlink /usr/bin/node. Shortcut for bash compatible shells: sudo ln -s `which nodejs` /usr/bin/node Or if you use non-standard shells, just hardcode the path you find with which nodejs: sudo ln -s /usr/bin/nodejs /usr/bin/node Later edit I found this explanation in the link you posted There is a naming conflict … Read more

Node.js Best Practice Exception Handling

Update: Joyent now has their own guide. The following information is more of a summary: Safely “throwing” errors Ideally we’d like to avoid uncaught errors as much as possible, as such, instead of literally throwing the error, we can instead safely “throw” the error using one of the following methods depending on our code architecture: … Read more