Skip to content

Commit f244bc5

Browse files
committed
add couchapp as distro/install/usage option
1 parent aff4732 commit f244bc5

File tree

9 files changed

+42
-0
lines changed

9 files changed

+42
-0
lines changed

couchapp/.couchappignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[
2+
".*~$",
3+
".git/*",
4+
"couchapp/*"
5+
]

couchapp/.couchapprc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

couchapp/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# vue-schema in Apache CouchDB
2+
3+
```
4+
couchapp push . http://{user}:{passw}@localhost:5984/{db}
5+
open http://{user}:{passwd}@localhost:5984/{db}/_design/vue-schema/_rewrite/
6+
```
7+
8+
Current schemas are loaded out of the same `schemas` directory (symlinked into
9+
`_attachments`). There is a MapReduce View for storing them in the DB, but this
10+
isn't hooked into the UI...yet.

couchapp/_attachments

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
..

couchapp/_docs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../schemas/

couchapp/_id

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_design/vue-schema

couchapp/rewrites.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
[
2+
{
3+
"from": "schemas",
4+
"to": "_view/schemas",
5+
"query": {
6+
"reduce": "false"
7+
}
8+
},
9+
{
10+
"from": "/",
11+
"to": "index.html"
12+
},
13+
{
14+
"from": "*",
15+
"to": "../../*"
16+
}
17+
]

couchapp/views/schemas/map.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
function(doc) {
2+
if (doc._id.substr(-6) == 'schema') {
3+
emit(null, 1);
4+
}
5+
}

couchapp/views/schemas/reduce.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
_count

0 commit comments

Comments
 (0)