From 643164d2f0dd0676a91339f5f14187cbab806237 Mon Sep 17 00:00:00 2001 From: brianc Date: Sun, 20 Feb 2011 16:12:06 -0600 Subject: [PATCH] some cleanup on the initial spike --- lib/binding.js | 3 ++- lib/libpq.js | 2 ++ test/libpq/binding-spike.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 lib/libpq.js diff --git a/lib/binding.js b/lib/binding.js index f2670c15..9fb4ffd0 100644 --- a/lib/binding.js +++ b/lib/binding.js @@ -1,2 +1,3 @@ +//require the c++ bindings & export to javascript var binding = require(__dirname + '/../build/default/binding'); -module.exports = binding.Connection; +module.exports = binding; diff --git a/lib/libpq.js b/lib/libpq.js new file mode 100644 index 00000000..f2670c15 --- /dev/null +++ b/lib/libpq.js @@ -0,0 +1,2 @@ +var binding = require(__dirname + '/../build/default/binding'); +module.exports = binding.Connection; diff --git a/test/libpq/binding-spike.js b/test/libpq/binding-spike.js index 9751936e..c588bf80 100644 --- a/test/libpq/binding-spike.js +++ b/test/libpq/binding-spike.js @@ -1,5 +1,5 @@ var helper = require(__dirname + "/../test-helper"); -var Connection = require(__dirname + "/../../lib/binding"); +var Connection = require(__dirname + "/../../lib/libpq").Connection; test('calling connect without params raises error', function() { var con = new Connection();