Permalink
Browse files

Easy access to the database from the console

  • Loading branch information...
1 parent 5ce105a commit 3aaee7612bcbac36d87915b0cff58db74190751d @lackac committed Jun 21, 2011
Showing with 3 additions and 0 deletions.
  1. +3 −0 Jakefile.coffee
View
@@ -92,6 +92,9 @@ task 'console', ->
repl = require "repl"
csl = repl.start()
global.emit = (k,v) -> console.log(k,v)
+ {couch, db} = getDB()
+ csl.context.couch = couch
+ csl.context.db = db
csl.context.ddoc = ddoc = require "./design"
for name,view of ddoc.views
csl.context[name] = view.map

0 comments on commit 3aaee76

Please sign in to comment.