2

I am developing Couchbase views and using the console is limiting because the output lines are truncated and JavaScript errors are not displayed. Is there a convenient way to test views locally with an engine like Node.js?

Thanks!

FuzzyAmi
  • 7,543
  • 6
  • 45
  • 79
user1398968
  • 215
  • 2
  • 6
  • 1
    You can call the view from Node, but the view itself is running "inside" the database. You can look in the log to see more information when you have errors in your views : http://www.couchbase.com/docs/couchbase-manual-2.0/couchbase-troubleshooting-logs.html – Tug Grall Mar 07 '13 at 14:41

2 Answers2

1

What about couchnode?

https://github.com/couchbase/couchnode https://github.com/couchbase/couchnode/blob/master/tests/08-views.js

Also since basically view query is HTTP request you can use any Web/HTTP/REST client or library for debugging. But apparently official SDK seems to be more convenient way.

Pavel Paulau
  • 786
  • 2
  • 7
  • 19
0

Also,

If you use the couchbase mock() function with the nodejs SDK, when you do your unit tests, the errors and console.log() inside your views are displayed.

Val Entin
  • 953
  • 10
  • 18