Node.js is an application runtime, similar to JRE in Java world or Dotnet FX in .NET world. Since it is an application runtime, you could use it for execute & run javascript code as program. Ofcourse, the javascript code should follow rules that are understood by node.js and its installed libraries.