Permalink
Browse files

Lock the config type to an object, because it works better as a child…

… hook
  • Loading branch information...
1 parent cf9cc6f commit 39e27039b09ac25586ca50c51df67d4d850b7f9a @paulbellamy committed Feb 14, 2012
Showing with 2 additions and 8 deletions.
  1. +0 −8 ReadMe.md
  2. +2 −0 lib/postgres.js
View
@@ -34,14 +34,6 @@ Hook.io Postgres is a client-wrapper around [pg](https://github.com/brianc/node-
## Hook config.json data
-``` js
-{
- "database": "pg://[user:password@]localhost[:port]/mydatabase",
-}
-```
-
-or
-
``` js
{
"database": {
View
@@ -16,6 +16,8 @@ var PostgresHook = exports.PostgresHook = function(options){
self.options = options;
+ if (typeof(self.options.database) === 'string') self.options.database = JSON.parse(self.options.database);
+
self.on('hook::ready', function(){
self._start();
});

0 comments on commit 39e2703

Please sign in to comment.