0.5.0 • Published 10 years ago

w5grid-rest-node v0.5.0

Weekly downloads
7
License
-
Repository
github
Last release
10 years ago

w5grid-rest-node

This is a Restful Service sample, combination of express and mongoDB

You can test W5Grid through Restful CRUD.

The installation is very easy, please follow the instruction.

Installation

Before any installation begun, you must have node.js installed on your computer.

Clone W5Grid from GitHub or install it through npm registry

npm install w5grid-rest-node

Install express and MongoClient to run w5grid-rest-node sample.

npm install

Install w5 through bower installation.

bower install w5

Execute

Befor running express, MongoDB must be installed and executed.

....
[initandlisten] MongoDB starting : pid=16075 port=27017 dbpath=/data/db/ ....
[initandlisten] db version v2.4.9
....
[websvr] admin web console waiting for connections on port 28017
[initandlisten] waiting for connections on port 27017
....

Run server.js. If the prameter is 'true', the initial data will be re populate.

node server.js (true)

Test

You can test the sameple program. The sample is located under the /test directory.

The test program has been written with QUnit

On the browser, type the following URL to see the test result.

http://localhost:3000/test/fetch.html
http://localhost:3000/test/sync.html

Test can be done by the samples that is applying Promise.

http://localhost:3000/test/fetch.promises.html
http://localhost:3000/test/sync.promises.html

Browser limitation exists when using browser Native Promise object without external library.
Check Can I use for the supported browers.