Programming Languages108k+ stars

Node.js

JavaScript runtime built on Chrome's V8 engine

Commit Details

Message
"add dependencies"
Author
Ryan Dahl
Date
2009-05-27
Hash
61890720c8a22a7f1577327b32a180a2d267d765

Fun Fact

Ryan Dahl chose "node" because a node is a simple component in a network. The project was initially called "web.js".

</>First Code

C++
#include <v8.h>
#include <node.h>

using namespace v8;
using namespace node;

static Handle<Value>
Compile (const Arguments& args) 
{
  HandleScope scope;
  
  if (args.Length() < 1)
    return Undefined();
  
  String::Utf8Value source(args[0]);

  Handle<Script> script = Script::Compile(String::New(*source));
  
  return scope.Close(script->Run());
}