diff options
Diffstat (limited to 'src/fauxton/readme.md')
-rw-r--r-- | src/fauxton/readme.md | 40 |
1 files changed, 16 insertions, 24 deletions
diff --git a/src/fauxton/readme.md b/src/fauxton/readme.md index 85f1dce62..bdf61e1e2 100644 --- a/src/fauxton/readme.md +++ b/src/fauxton/readme.md @@ -15,48 +15,40 @@ Current items of interest: * Data popups for additional db info on \_all_dbs page * CouchDB API compliant urls -## Setup Fauxton ## -A recent of [node.js](http://nodejs.org/) and npm is required. ### CouchDB Setup ### - 1. Clone the Couchdb repo: https://github.com/apache/couchdb.git or http://git-wip-us.apache.org/repos/asf/couchdb.git - cd couchdb - git checkout fauxton + Clone the Couchdb repo: https://github.com/apache/couchdb.git or http://git-wip-us.apache.org/repos/asf/couchdb.git -### Fauxton Setup ### + The easiest way to use fauxton, especially when developing for it, is to link it to your existing couch _utils directory. Eg: + `ln -s couchdb/src/fauxton /Applications/Apache\ CouchDB.app/Contents/Resources/couchdbx-core/share/couchdb/www` - cd src/fauxton + It will be available at [http://localhost:5984/_utils/fauxton/](http://localhost:5984/_utils/fauxton/) - # Install all dependencies - npm install +### Development -#### (Optional) To avoid a npm global install - # Add node_modules/.bin to your path - # export PATH=./node_modules/.bin:$PATH - # Or just use the wrappers in ./bin/ + cd couchdb/src/fauxton - # Development mode, non minified files - ./bin/grunt couchdebug + To set fauxton into develop mode, run `./rebuild` + For production, after code changes, run `./rebuild compile` (requires [jamjs](http://jamjs.org/docs)) - # Or fully compiled install - # ./bin/grunt couchdb -### Dev Server - Using the dev server is the easiest way to use fauxton, specially when developing for it. +### As a couchapp - grunt dev + Install [erica](https://github.com/benoitc/erica) -### To Deploy Fauxton + To deploy to your local [Couchdb instance] (http://localhost:5984/fauxton/_design/fauxton/_rewrite/) + `./push http://admin:pass@localhost:5984/fauxton' - ./bin/grunt couchapp_deploy - to deploy to your local [Couchdb instance] (http://localhost:5984/fauxton/_design/fauxton/index.html) + For production, after code changes (requires [jamjs](http://jamjs.org/docs)) run + `./push http://admin:pass@localhost:5984/fauxton compile` ## Understang Fauxton Code layout -Each bit of functionality is its own seperate module or addon. All core modules are stored under `app/module` and any addons that are optional are under `app/addons`. +Each bit of functionality is its own seperate module or addon. All core modules are stored under `js/module` and any addons that are optional are under `js/addons`. We use [backbone.js](http://backbonejs.org/) and [Backbone.layoutmanager](https://github.com/tbranyen/backbone.layoutmanager) quite heavily, so best to get an idea how they work. -Its best at this point to read through a couple of the modules and addons to get an idea of how they work. Two good starting points are `app/addon/config` and `app/modules/databases`. +Its best at this point to read through a couple of the modules and addons to get an idea of how they work. Two good starting points are `js/addon/config` and `js/modules/databases`. Each module must have a `base.js` file, this is read and compile when Fauxton is deployed. A `resource.js` file is usually for your Backbone.Models and Backbone.Collections, `view.js` for your Backbone.Views. The `routes.js` is used to register a url path for your view along with what layout, data, breadcrumbs and api point is required for the view. |