Before starting this process make sure you have a running instance of CouchDB cartridge. In order to check that direct your host or remote web browser to below address.
http://10.11.12.2:5984/_utils/index.html
Note: You will not see this much of databases, if your running this for first time.
10.11.12.2 is the private ip of the generated Openstack instance after subscribing to the CouchDB docker cartridge. You can find your IP if you login to Openstack.
CouchApp is a set of scripts and a jQuery plugin designed to bring clarity and order to the freedom ofCouchDB's document-based approach.
Also, be sure to checkout our Erlang-based sibling, erica.
http://10.11.12.2:5984/_utils/index.html
Note: You will not see this much of databases, if your running this for first time.
10.11.12.2 is the private ip of the generated Openstack instance after subscribing to the CouchDB docker cartridge. You can find your IP if you login to Openstack.
If your using Amazon EC2 as per the IaaS provider you have to login that dashboard and find out the URL.
If your done with the above stuff now you can continue with the original subject.
What is CouchApps
CouchApp is designed to structure standalone CouchDB application development for maximum application portability.
CouchApp is a set of scripts and a jQuery plugin designed to bring clarity and order to the freedom ofCouchDB's document-based approach.
Also, be sure to checkout our Erlang-based sibling, erica.
List of CouchApps available
- CouchApp.py
- Erica
- Soca
- node.couchapp.js
- Reupholster
- Kanso
- Situp
- Mouch
Write apps using just JavaScript and HTML
Render HTML documents using JavaScript templates run by CouchDB. You'll get parallelism and cacheability, using only HTML and JS. Building standalone CouchDB applications according to correct principles affords you options not found on other platforms.Deploy your apps to the client
CouchDB's replication means that programs running locally can still be social. Applications control replication data-flows, so publishing messages and subscribing to other people is easy. Your users will see the benefits of the web without the hassle of requiring always-on connectivity.
Installation of CouchApp
Couchapp requires Python 2.5x or greater. Couchapp is most easily installed using the latest versions of the standard python packaging tools, setuptools and pip. They may be
installed like so:
$ curl -O https://bootstrap.pypa.io/get-pip.py
$ sudo python get-pip.py
Installing couchapp is then simply a matter of:
$ pip install couchapp
On OSX 10.6/10.7 you may need to set ARCH_FLAGS:
$ env ARCHFLAGS="-arch i386 -arch x86_64" pip install couchapp
To install/upgrade a development version of couchApp:
$ pip install -e git+http://github.com/couchapp/couchapp.git#egg=Couchapp
Note: Some installations need to use sudo command before each command line.
Now your done with installing couchApps let's deploy your first CouchApp!
First clone my githab sample couchApp project in your host computer.
git clone https://github.com/thushara35/example.git
cd example
let's install the cloned couchApp to CouchDB. To do this you need to push the folder content to CouchDB database server.
couchapp push . http://localhost:5984/couchappexample
or (if you have security turned on)
couchapp push . http://adminname:adminpass@localhost:5984/couchappexample
You can see a new DB call couchappexample in futon(couchdb dashboard - http://192.168.92.1:5984/_utils/index.html )
Now simply login to this URL: http://10.11.12.2:5984/couchappexample/_design/example/index.html which generated above and you will find your first couchApp.
Thanks and have a nice day!
Comments
Post a Comment