Showing posts with label couchapp. Show all posts
Showing posts with label couchapp. Show all posts

Monday, January 27, 2014

setup erlang based couchapp on FreeBSD

with erica:
$ erica create-webapp appid=couch9
$ tree couch9 
couch9
|-- _ddoc
|   |-- rewrites.json
|   `-- validate_doc_update.js
|-- app.webapp
|-- img
|   |-- favicon.ico
|   `-- promo
|       |-- icon_128.png
|       |-- icon_16.png
|       |-- icon_48.png
|       |-- icon_96.png
|       |-- promo_small.png
|       `-- screenshot1.png
`-- index.html
$ erica create-app appid=couch10
$ tree couch10
couch10
|-- .couchapprc
|-- _attachments
|-- _id
|-- language
|-- lists
|-- shows
`-- views
    `-- by_type
        `-- map.js

Saturday, January 25, 2014

setup node.js-based couchapp on FreeBSD

as root:

pkg install couchdb
couchdb -b

pkg install node
pkg install npm

# this brings problems
#npm install couchapp -g


as normal user:

mkdir myapp
cd myapp/

# workaround: install locally
npm install couchapp
./node_modules/.bin/couchapp boiler
# it complains that it cannot be created, but app.js and attachments are there
./node_modules/.bin/couchapp push app.js http://localhost:5984/myapp
$ tree myapp -L 4
myapp
|-- app.js
|-- attachments
|   |-- index.html
|   |-- jquery-1.4.4.min.js
|   |-- layout.css
|   |-- sammy
|   |   |-- plugins
|   |   |   |-- sammy.cache.js
|   |   |   |-- sammy.data_location_proxy.js
|   |   |   |-- sammy.ejs.js
|   |   |   |-- sammy.form.js
|   |   |   |-- sammy.haml.js
|   |   |   |-- sammy.json.js
|   |   |   |-- sammy.meld.js
|   |   |   |-- sammy.mustache.js
|   |   |   |-- sammy.nested_params.js
|   |   |   |-- sammy.path_location_proxy.js
|   |   |   |-- sammy.pure.js
|   |   |   |-- sammy.storage.js
|   |   |   |-- sammy.template.js
|   |   |   `-- sammy.title.js
|   |   `-- sammy.js
|   `-- site.js

setup python-based couchapp on FreeBSD


as root:

pkg install couchdb
couchdb -b

pkg install py27-virtualenv 
pkg install py27-pip


as normal user:

virtualenv couchapps
cd couchapps
. bin/activate
pip install couchapp

mkdir apps
cd apps/

couchapp generate app1
cd app1
git init
couchapp push . http://localhost:5984/example