Skip to content
Browse files

Use `bindings` to properly load the binding

Sometimes the binding file isn't outputted in
`build/Release/hashvalue.node`, but for example in
`build/Debug/hashvalue.node`. `bindings` module covers all the cases.
  • Loading branch information...
1 parent 232cb9d commit 5fc0cb9012c7b0bc291e5f8d16318a6847ffb4d6 @mmalecki mmalecki committed Oct 16, 2013
Showing with 2 additions and 1 deletion.
  1. +1 −1 index.js
  2. +1 −0 package.json
View
2 index.js
@@ -1,6 +1,6 @@
'use strict';
-var hashValue = require('./build/Release/hashvalue')
+var hashValue = require('bindings')('hashvalue.node')
, SimpleCache = require("simple-lru-cache")
, parse = require('connection-parse')
, crypto = require('crypto');
View
1 package.json
@@ -23,6 +23,7 @@
"url": "http://github.com/3rd-Eden/node-hashring.git"
},
"dependencies": {
+ "bindings": "1.1.x",
"connection-parse": "0.0.x",
"nan": "0.3.x",
"simple-lru-cache": "0.0.x"

0 comments on commit 5fc0cb9

Please sign in to comment.
Something went wrong with that request. Please try again.