Skip to content

Instantly share code, notes, and snippets.

@clkao
Created March 23, 2013 06:53
Show Gist options
  • Save clkao/5226736 to your computer and use it in GitHub Desktop.
Save clkao/5226736 to your computer and use it in GitHub Desktop.
...
diff --git a/bin/cmd.ls b/bin/cmd.ls
index 937cf12..1b2992e 100644
--- a/bin/cmd.ls
+++ b/bin/cmd.ls
@@ -2,6 +2,12 @@
require! {optimist, plv8x, trycatch}
{argv} = optimist
conString = argv.db or process.env.PGRESTCONN or process.env.TESTDBNAME or process.argv?2
+{pgsock} = argv
+
+if pgsock
+ conString = do
+ host: pgsock
+ database: conString
plx <- (require \../).new conString
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment