Usage TOP Developer

Building

The build method for K2HASH Node.js addon library is explained below.

1. Install prerequisites before compiling

2. K2HASH library

In advance, you need to install the developer package of K2HASH library(See here for installation).
Without installing this package, you can also build the K2HASH library(See here for the build).

3. Clone source codes from Github

$ git clone git@github.com:yahoojapan/k2hash_nodejs.gif
$ cd k2hash_nodejs

4. Building and Testing

Run the build and test using the npm command.

$ sudo npm cache clean
$ npm update
$ npm run build
$ npm run test

If the building and testing succeed, you can find three ** *.node ** files in the following path. (And a symbolic link build under the top directory.)

$ ls -la build
lrwxrwxrwx 1 guest users     43 Nov 30 14:00 build -> /home/guest/k2hash_nodejs/src/build

$ ls -l src/build/Release/*.node
total 996
-rwxr-xr-x 1 guest users 563119 Nov 30 14:00 k2hash.node
-rwxr-xr-x 1 guest users 223379 Nov 30 14:00 k2hkeyqueue.node
-rwxr-xr-x 1 guest users 222004 Nov 30 14:00 k2hqueue.node
Usage TOP Developer