Skip to content

BryanDonovan/node-couchbase-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

node-couchbase-example

Node.js Couchbase Example

An example Couchbase Node.js example using couchnode.

Features

Setup

Note: Requires Couchbase 2.1.x or greater.

Assuming you already have NodeJS 0.10.13 (it will probably work with older versions as well) or higher installed:

git clone git@github.com:BryanDonovan/node-couchbase-example.git
cd node-couchbase-example
npm install .
make

The make command will run JSHint, all the mocha unit tests, and check the test coverage. To view the test coverage report, open coverage/lcov-report/index.html after running make.

You can also run make test to just run the tests with coverage, make test-cov to run the tests and attempt to open the coverage report in your browser, and make lint to run JSHint.

To run the acceptance tests (which are just mocha tests), first start the server:

bin/start all

Then:

make test-acceptance

You can launch the sever on more than one port via bin/launch, for example:

bin/launch users

.. will launch the users app on two ports (specified in config.js).

Then you can run the acceptance tests against either of those ports by specifying the PORT env variable:

PORT=12100 make test-acceptance

About

Example Node.js application using Couchbase via couchnode npm.

Resources

License

Stars

Watchers

Forks

Packages