Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Protocol Buffers for Node.JS

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 example
Octocat-spinner-32 test
Octocat-spinner-32 .gitignore
Octocat-spinner-32 COPYING
Octocat-spinner-32 README.md
Octocat-spinner-32 addon.cc
Octocat-spinner-32 package.json
Octocat-spinner-32 protobuf_for_node.cc
Octocat-spinner-32 protobuf_for_node.h
Octocat-spinner-32 wscript
README.md

This is a fork of http://code.google.com/p/protobuf-for-node/

It now works with the NodeJS 0.6.x series.

Prerequisites:

NodeJS v0.6.X npm

To install on Ubuntu and OSX:

The first steps are to build and install Google's protobuf library. Make sure you have the right version by running "protoc --version" after the install.

wget http://protobuf.googlecode.com/files/protobuf-2.4.1.tar.gz
tar -xzvf protobuf-2.4.1.tar.gz
cd protobuf-2.4.1/
./configure && make && sudo make install
cd

This installs the npm package.

npm install protobuf

For Ubuntu, update library paths.

sudo ldconfig

For OSX, you might need to add the path:

export DYLD_LIBRARY_PATH=/home/chris/node_modules/protobuf/build/Release:/usr/local/lib:$DYLD_LIBRARY_PATH

And test that it works... Run node, try

require('protobuf');

you should see:

{ Schema: [Function: Schema] }

As seen from the instructions above, this is my first attempt at packaging a slightly complex C++ module for NPM.

If you can help me simplify these instructions, please submit a patch.

Good luck,

Chris.

Something went wrong with that request. Please try again.