-
Notifications
You must be signed in to change notification settings - Fork 154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mono repo take three #168
Merged
Merged
Mono repo take three #168
Changes from 250 commits
Commits
Show all changes
300 commits
Select commit
Hold shift + click to select a range
0d59572
(#39) - implement replication history
nolanlawson 040fb76
(#41) - return correct error code in changes
nolanlawson 763c1f7
0.2.0
nolanlawson f68853b
(#46) - make uuids more random
nolanlawson a1f83db
(pouchdb/pouchdb-server#38) - in-memory/filepath option
nolanlawson f44246d
0.3.0
nolanlawson 4229b67
(#45) - update fauxton
nolanlawson d540afc
(#55) - stub out _config
nolanlawson 1d1c04e
(#58) - return the right status code
nolanlawson 8a76524
(#14) - adds rewrites support
marten-de-vries 66b6f76
(#62) - remove useless logging
nolanlawson 5644e5e
(#65) - Adds list, show & update function support.
marten-de-vries baf799f
(#66) - stub out _log, _stats
nolanlawson 222e734
(#59) - Update Fauxton with new branding
nolanlawson 61006dc
0.3.1
nolanlawson 987a989
(#69) - Adds validate_doc_update function support
marten-de-vries c64ec6f
(#71) - Some improvements (couchdb-harness progress)
marten-de-vries 0170fe7
0.4.0
nolanlawson 5c0634b
(#73) - Test in travis with pouchdb-server
nolanlawson 2d5cc2e
(#72) - add verifyinstall
nolanlawson f4b7afe
0.5.0
nolanlawson f7071a0
(pouchdb/pouchdb#2537) - lock express to 4.6.1
nolanlawson 395154b
0.5.1
nolanlawson 2ee456b
(#78) - clearer contributing guidelines
nolanlawson ecde3fb
(#81) - fixes for npm-fullfat-registry
nolanlawson 87db1f4
0.5.2
nolanlawson 487d01a
(pouchdb/pouchdb#2546) - better error handling
calvinmetcalf 086d61c
0.5.3
nolanlawson 37277f1
(#85) - only use rawBodyParser where necessary
nolanlawson 0ff7264
0.5.4
nolanlawson 92bb88e
(#85) - actually implement multipart correctly
nolanlawson 8563ac6
0.5.5
nolanlawson cfb5ce2
(#88) - make _changes actually continuous
nolanlawson 3b5e57a
0.5.6
nolanlawson 01183ff
(pouchdb/pouchdb#2545) - use bulk doc error if available
calvinmetcalf b1f6a03
(#90) - remove console.log
nolanlawson eddbd58
0.5.7
nolanlawson e2d997e
(#92) - clean up multipart parsing
nolanlawson e5b3ed9
(#79) - fix deprecation warning for host -> hostname
nolanlawson 2a72f10
(#95) - implement longpoll changes
nolanlawson bb55557
(#94) - add compression
nolanlawson c394a7c
0.5.8
nolanlawson 2f70d67
make CI build faster
PeterDaveHello 18f6a0d
(#99) - "implement" _ensure_full_commit
nolanlawson 3f4eb63
0.5.9
nolanlawson f7f6cb6
(pouchdb/pouchdb#2543) - increase JSON parse size
nolanlawson 6f11745
0.5.10
nolanlawson 63d3ee7
(#75) - Attachment support for design docs.
marten-de-vries 1d75b18
(#103) - Adds basic authentication & configuration support.
marten-de-vries 5de5fd4
(#108) - Adds _replicator database
marten-de-vries 55d976a
0.6.0
nolanlawson e5b7ede
(#109) - Adds /_security support.
marten-de-vries b1f8448
(#110) - Documents 'non-PouchDB' functionality.
marten-de-vries a4234f3
(#112) - update Fauxton
nolanlawson f4386bd
(#112) - add fonts/, since fauxton has that now
nolanlawson 4b0ef40
(#111) - Fixes bugs discovered by couchdb-harness
marten-de-vries 3f1f190
0.7.0
nolanlawson b004fdc
(#113) - Fix regression in POST /_session
marten-de-vries 5fc0b3c
0.7.1
nolanlawson c808946
(#115) - Remove no longer necessary code
marten-de-vries 7c43a08
(#122) - Don't claim req.session
marten-de-vries 50bd484
0.7.2
marten-de-vries d6f9b36
(#16) - Move url registration into init scope
daleharvey fecee52
(pouchdb/pouchdb#3056) - _changes with POST
nolanlawson ddac517
(#130) - Update sendfile to sendFile
yaronyg 73fbfe2
0.7.3
nolanlawson 4063d79
(#132) - Get rid of 'dbs' by using allDbs() more
marten-de-vries 43742fd
(#16) - Split out routes into separate files
marten-de-vries 64c47d0
(#138) - update allDbs dependency
nolanlawson 2181ddb
0.7.4
nolanlawson 252c18b
(#137) - add disk_size to the db info route
marten-de-vries cbec74c
(#136) - Add vhosts support
marten-de-vries 70f312b
(#127) - Prevent config file corruption on crash
marten-de-vries 019bac6
0.8.0
nolanlawson 254d507
(#139) - Use mountpoint as rewrite base url
marten-de-vries 7aeadf1
0.8.1
marten-de-vries 526b9ea
(#128) - Add test-pouchdb & test-couchdb
marten-de-vries 837a114
(pouchdb/pouchdb-server#76) - Change express dependency version
marten-de-vries a0c13c3
(#146) - add travis badge
nolanlawson 7518a50
(#143) - Add express-pouchdb specific test suite
marten-de-vries e2daa96
(#145) - remove phantom/firefox from allowed failures
nolanlawson 83b7d02
(#148) - Increase mocha timeout for Travis
marten-de-vries 9f94735
(pouchdb/pouchdb-server#72) - Reintroduce app.couchConfig
marten-de-vries 2e8a97c
(pouchdb/pouchb-server#72) - change PouchDB on the fly
marten-de-vries b41acdb
0.9.0
nolanlawson a6887fd
(#150) - remove express peer dependency
nolanlawson 6fca4d9
0.9.1
daleharvey 0fb32f1
(#147) - Implements logging & /_log
marten-de-vries 99e68dd
(#153) - improved error handling
rudasn 47bd5b0
0.10.0
marten-de-vries fc5e5c8
(#159) - handle json body parser errors
marten-de-vries 3920710
(#122) - Modular express-pouchdb and mode support
marten-de-vries 3d5cfbc
(#157) - Fix config data model & api
marten-de-vries b42d590
(pouchdb/pouchdb-server#67) - Support http-pouchdb objects
marten-de-vries 29c016b
(#118,#119,#120,#121) - Update documentation
marten-de-vries 6e6f7cf
0.11.0
nolanlawson 23c5afd
(#163) - vendor and uuid at root
marten-de-vries a5403af
(#165) - adding view cleanup route and method invocation
mshick a516d3e
0.12.0
nolanlawson c8c27e1
(#165) - Move /_view_cleanup into its own file
marten-de-vries e09d9c4
0.13.0
nolanlawson e4d93f3
(#168) - Make JSON body parser limit configurable
marten-de-vries 0bdc5e0
(#169) - Some couchdb-harness fixes
marten-de-vries fd604db
(#172) - Attachment couchdb-harness fixes
marten-de-vries 7fb0762
(#182) - Upgrade pouchdb-server
nolanlawson a7e514f
(#173) - Config couchdb-harness fixes
marten-de-vries 03d8210
(#174) - Uuids couchdb-harness fixes
marten-de-vries 8439982
(#175) - Rewrite couchdb-harness fixes
marten-de-vries 5111b3e
(#176) - Bulk docs couchdb-harness fixes
marten-de-vries 0325f8b
(#177) - Changes couchdb-harness fixes
marten-de-vries 541683f
(#178) - Compact couchdb-harness fixes
marten-de-vries 26e8ee3
(#187) - Show/list/update couchdb-harness fixes
marten-de-vries ca4ea3c
0.13.1
nolanlawson d3554f7
(pouchdb/couchdb-harness#19) - auth fixes
marten-de-vries d0b1c0b
(#164) - test minimumForPouchDB mode
marten-de-vries a83998f
(#191) - Split out temp views in a separate file
marten-de-vries 2e553c8
(#197) - pouchdb-find support
marten-de-vries f61e15c
0.14.0
nolanlawson 3391319
(#206) - Do not create empty config files
marten-de-vries d64a92f
(pouchdb/pouchdb#3872) - fix getAttachment with rev
nolanlawson 53a81f2
0.14.1
nolanlawson 581a453
(#2832) - don't store 'follows' key for multipart
nolanlawson df363df
0.14.2
nolanlawson 4016892
Add post handler to views route
robotlovesyou 7299e10
(#217) test db existence with decoded name
tyler-johnson ee7677a
0.15.0
nolanlawson de44f2c
(pouchdb/pouchdb#4052) - Add Apache license
nolanlawson 1cbc753
(#222) - update jshint
nolanlawson c0849dd
(pouchdb/pouchdb-server#108) - fix compact()
nolanlawson f8038b0
(#225) - actually test
nolanlawson 2f6280d
(#231) - remove PouchDB.destroy usage
nolanlawson 9c21d2d
(#213) - allow HEAD requests to /:db/_all_docs
janl 735526c
(#196) - implement _bulk_get
nolanlawson a8c2419
0.16.0
nolanlawson b017aaa
(#238) - parallelize getAttachment()
nolanlawson 337a8ec
(#200) - allow uploading attachments
nolanlawson a4a73e9
0.16.1
nolanlawson 841f75f
(#218) - add db name to userCtx
tyler-johnson 9a5c09a
0.16.2
nolanlawson da18b2a
(#244) - add _membership and _cluster_setup APIs
nolanlawson 83bf081
(#244) - move cluster rewrite in its own file
marten-de-vries f176580
(#242) - Update fauxton to 1.0.3
NickColley 874bbce
0.17.0
nolanlawson c8ee1f2
(#252) - fix jshint
nolanlawson 3fb9af1
(#231, #250) - Re-introduce PouchDB.destroy()
marten-de-vries ecb9511
(pouchdb/pouchdb-server#117) - set json type
nolanlawson 409b712
0.17.1
nolanlawson 04c7693
(pouchdb/pouchdb-server#117) - always set content-type
nolanlawson 6684d30
0.17.2
nolanlawson 00e836f
(#257) - Redirect /_utils/ to /_utils
NickColley 1808abd
(#255) - switch to 0.12 as default
nolanlawson 87c86a9
(#240) - allow GETing a user's document as the user
christophwitzko 4eda703
update pouchdb-server version
nolanlawson b48a0b1
0.17.3
nolanlawson c730133
1.0.0
nolanlawson f1cc6bf
use latest firefox in travis
nolanlawson 959d6b3
pin travis to firefox 41
nolanlawson 2e1fe41
(#265) - return immediately when using opts.continuous
nolanlawson 7e04d46
1.0.1
nolanlawson f4851a1
(#269) - Fixed a typo in the docs
jerem 57aff0b
(#276) - install pouchdb from git for tests
nolanlawson 78cc723
(pouchdb/pouchdb#4669) - fix ETags for GET /db/doc
nolanlawson b743fae
(#279) - make test logging less verbose
nolanlawson 0717d80
(#281) - remove Etag logic
nolanlawson 5415eca
1.0.2
nolanlawson feec202
trim down npm tgz size
nolanlawson 96a0422
(#285) - Support lists with views from other DDocs
mroeder ef495aa
(#268) - pouchdb-auth update
marten-de-vries 80ed5cf
1.0.3
nolanlawson fb763f1
(#301) - massive greenkeeper update, pin deps
nolanlawson 9af7efa
(#301) - disable phantomjs for now
nolanlawson f88c6b1
(#305) - chore(package): update fs-extra to version 0.27.0
greenkeeperio-bot 8854af4
(#304) - Document that pouchdb+express modules be installed
madarche d0307b4
(#306) - chore(package): update fs-extra to version 0.28.0
greenkeeperio-bot 459d6d2
(#307) - chore(package): update jshint to version 2.9.2
greenkeeperio-bot 8c08fcd
chore(package): update pouchdb-auth to version 2.1.0 (#332)
greenkeeperio-bot 17e7465
Update pouchdb-express for PouchDB 5.4 (#336)
garrensmith 74adcc3
1.0.4
garrensmith 4d22dd4
fix test setup (#342)
garrensmith 3fb04f2
1.0.5
garrensmith 459e185
update all old dependencies (#349)
garrensmith 48f6942
1.0.6
garrensmith 76f815b
(#354) - chore(package): update supertest to version 2.0.0
greenkeeperio-bot 6f72764
(#352) - update node-uuid to 1.4.7 for security fix
mohlsen efe5542
(#359) - chore(package): update pouchdb-auth to version 2.1.1
greenkeeperio-bot 007c40b
1.0.7
nolanlawson 3bdd997
(#374) update to PouchDB@6 (#375)
gr2m bcdc0b7
(rebased on PouchDB@6) Fix "req.query.hasOwnProperty is not a functio…
gr2m 67a2d48
(#377) - remove incorret dbname encoding (BREAKING)
gr2m e7e5163
chore(package): update memdown to version 1.2.1 (#373)
greenkeeperio-bot 286c6de
chore(package): update pouchdb-find to version 0.10.3 (#351)
greenkeeperio-bot 5cef82d
(#378) - remove incorrect dbname encoding (part 2)
gr2m 2c92df8
(#380) - add changelog note to README
gr2m 9b8cc6b
2.0.0
gr2m a482e4a
(#388) - chore(package): update mocha to version 3.1.2
greenkeeperio-bot ea60789
(#372) - add inMemoryConfig option
tyler-johnson f8019c4
(#372) - update README
nolanlawson 67f7b26
2.1.0
nolanlawson 4d66be5
(#398) - avoid stuck changes
gr2m 8092e1c
(#395) - Update all deps
nolanlawson 70dafbd
2.1.1
nolanlawson 7b86362
(#406) node-uuid -> uuid (#406)
nolanlawson 7f76bee
(#410) - simplify and modernize travis config (#410)
nolanlawson 2d5811e
(#407) - remove pouchdb-node from deps (#407)
nolanlawson 7e0eb9d
(#405) - support latest=true (#409)
nolanlawson 0f2365b
2.1.2
nolanlawson 7c1e6f9
(#18) - use native Promises, fix Promise creation (#411)
nolanlawson 3e6e9c1
(#412) - correctly escape filenames
nolanlawson 8ebbd28
2.1.3
nolanlawson 6b1f3d5
test specific version of pouchdb for now
nolanlawson f10e65a
add travis_retry to .travis.yml
nolanlawson 6857cc7
(#415) - Update pouchdb-server to version 2.0.1 🚀
greenkeeperio-bot be48688
chore(package): update pouchdb-promise to version 6.1.1
greenkeeperio-bot 0500e59
(#417) - include id in all bulk_docs results (#417)
KlausTrainer 7ac1c49
2.1.4
nolanlawson a97d001
add logPath config (#419)
TheoTx d1af0a2
2.2.0
nolanlawson 78220b3
(#418) - chore(package): update fs-extra to version 2.0.0
greenkeeperio-bot 76f8ed9
(#420) - chore(package): update multiparty to version 4.1.3
greenkeeperio-bot 25280ed
(#423) - chore(package): update supertest to version 3.0.0
greenkeeperio-bot c558d06
(#425) - chore(package): update pouchdb-promise to version 6.1.2
greenkeeperio-bot 5af64e6
(#424) - fix and test mapreduce, use vm instead of eval
nolanlawson 6827e67
2.2.1
nolanlawson 17cb28a
(#398) - reuse PouchDB object between calls
nolanlawson 9d8e747
2.2.2
nolanlawson ad6bfe4
(#427) - update Fauxton by switching to pouchdb-fauxton package
nolanlawson 092ec00
use eslint instead of jshint
garrensmith fab2e98
2.2.3
nolanlawson adea843
use require.resolve() for exact pouchdb-fauxton path
nolanlawson b1c6c35
2.2.4
nolanlawson 36cd939
setup for pouchdb-server
garrensmith 68c2369
Add 'packages/node_modules/express-pouchdb/' from commit 'b1c6c3567f6…
garrensmith 82f65d8
add express-pouchdb
garrensmith cc80fd2
remove empty command
garrensmith c83b503
fix eslint
nolanlawson f1151dc
add mapreduce tests
nolanlawson ddf169b
fixing tests
garrensmith 73f52fa
use latest pouchdb version
garrensmith 7e8b5da
add pouchdb-server
garrensmith 1ecb911
travis debug
garrensmith 20af30e
logging on test script
garrensmith 12ab2c1
more logging
garrensmith 039e4a8
travis again
garrensmith 3fc5556
more
garrensmith a2f6e66
remove pouchdb-tests directory
garrensmith ec09f05
link express-pouchdb and update readmes
garrensmith db3796b
set pre-release version
garrensmith 753d7fc
cleanup structure, implement release script
nolanlawson 600b3f3
fix bin file
nolanlawson 8b7b73d
update READMEs, CONTRIBUTING, and package.jsons
nolanlawson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,9 @@ | ||
Want to help me make this thing awesome? Great! Here's how you should get started. | ||
|
||
1. First, make sure that the bugfix or feature you're looking to implement isn't better fit for [express-pouchdb](https://github.com/nick-thompson/express-pouchdb). | ||
2. PouchDB is still developing rapidly. If you need bleeding egde versions, you should first read how to [set up express-pouchdb for local development](https://github.com/nick-thompson/express-pouchdb#contributing). (Make sure that, afterwards, you `npm link` express-pouchdb). | ||
3. Go ahead and fork **pouchdb-server**, clone it to your machine. | ||
4. Now you'll want to, from the root of **pouchdb-server**, `npm link express-pouchdb`. | ||
5. `npm install` the rest of the dependencies. | ||
# Contributing | ||
|
||
Please make your changes on a separate branch whose name reflects your changes, push them to your fork, and open a pull request! | ||
Want to help me make this thing awesome? Great! Here's how you should get started. | ||
|
||
For commit message style guidelines, please refer to [PouchDB CONTRIBUTING.md](https://github.com/pouchdb/pouchdb/blob/master/CONTRIBUTING.md). | ||
1. First, check whether your bugfix must be in `express-pouchdb` or `pouchdb-server`. | ||
2. Make your changes on a separate branch whose name reflects your changes, | ||
3. Run all tests to make sure your changes do not break anything | ||
4. To create a PR, push your changes to your fork, and open a pull request! | ||
5. For a PR, follow the commit message style guidelines in[PouchDB CONTRIBUTING.md](https://github.com/pouchdb/pouchdb/blob/master/CONTRIBUTING.md). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,195 +1,24 @@ | ||
# pouchdb-server | ||
# pouchdb-server monorepo | ||
[![Build Status](https://travis-ci.org/pouchdb/pouchdb-server.svg)](https://travis-ci.org/pouchdb/pouchdb-server) | ||
|
||
> A standalone REST interface server for PouchDB. | ||
This is the monorepo for PouchDB-Server and Express-PouchDB. It follows the same format as the (PouchDB monorepo](https://github.com/pouchdb/pouchdb). This follows the [alle](https://github.com/boennemann/alle) monorepo setup. You can read more about monorepo's [here](https://github.com/babel/babel/blob/master/doc/design/monorepo.md)) and (here)[https://gist.github.com/nolanlawson/457cdb309c9ec5b39f0d420266a9faa4]. | ||
|
||
## Introduction | ||
Getting Help | ||
------------ | ||
|
||
**pouchdb-server** is a simple Node.js server that presents a simple REST API, which mimics that of [CouchDB](http://couchdb.apache.org), | ||
on top of [PouchDB](http://pouchdb.com). Among other things, this allows users to replicate IndexedDB stores to LevelDB, or to | ||
spin up a quick and dirty drop-in replacement for CouchDB to get things moving quickly. | ||
The PouchDB community is active [on Freenode IRC](https://www.irccloud.com/invite?channel=pouchdb&hostname=irc.freenode.net&port=6697&ssl=1), [Slack](http://slack.pouchdb.com),in [the Google Groups mailing list](https://groups.google.com/forum/#!forum/pouchdb), and [on StackOverflow](http://stackoverflow.com/questions/tagged/pouchdb). Or you can [tweet @pouchdb](http://twitter.com/pouchdb)! | ||
|
||
## Installation | ||
If you think you've found a bug in PouchDB, please write a reproducible test case and file [a Github issue](https://github.com/pouchdb/pouchdb/issues). We recommend [bl.ocks.org](http://bl.ocks.org/) for code snippets, because some iframe-based services like JSFiddle and JSBin do not support IndexedDB in all browsers. You can start with [this template](https://gist.github.com/nolanlawson/816f138a51b86785d3e6). | ||
|
||
```bash | ||
$ npm install -g pouchdb-server | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
|
||
Usage: pouchdb-server [options] | ||
|
||
Options: | ||
-p, --port Port on which to run the server. (Defaults to | ||
/_config/httpd/port which defaults to 5984). | ||
-d, --dir Where to store database files. (Defaults to | ||
/_config/couchdb/database_dir which defaults to the | ||
current directory). | ||
-c, --config The location of the configuration file that backs | ||
/_config. (Defaults to ./config.json). | ||
-o, --host The address to bind the server to. (Defaults to | ||
/_config/httpd/bind_address which defaults to | ||
127.0.0.1). | ||
-m, --in-memory Use a pure in-memory database which will be deleted | ||
upon restart. (Defaults to | ||
/_config/pouchdb_server/in_memory which defaults to | ||
false). | ||
--sqlite Use PouchDB over SQLite instead of LevelDOWN. | ||
(Defaults to /_config/pouchdb_server/sqlite which | ||
defaults to false). | ||
-r, --proxy Proxy requests to the specified host. Include a | ||
trailing '/'. (Defaults to | ||
/_config/pouchdb_server/proxy which defaults to | ||
undefined). | ||
-n, --no-stdout-logs Stops the log file from also being written to stdout. | ||
(Defaults to /_config/pouchdb_server/no-stdout-logs | ||
which defaults to false). | ||
--no-color Disable coloring of logging output. | ||
--level-backend Advanced - Alternate LevelDOWN backend (e.g. memdown, | ||
riakdown, redisdown). Note that you'll need to | ||
manually npm install it first. (Defaults to | ||
/_config/pouchdb_server/level_backend which defaults | ||
to undefined). | ||
--level-prefix Advanced - Prefix to use for all database names, | ||
useful for URLs in alternate backends, e.g. | ||
riak://localhost:8087/ for riakdown. (Defaults to | ||
/_config/pouchdb_server/level_prefix which defaults | ||
to undefined). | ||
|
||
Examples: | ||
|
||
pouchdb-server --level-backend riakdown --level-prefix riak://localhost:8087 | ||
Starts up a pouchdb-server that talks to Riak. | ||
Requires: npm install riakdown | ||
|
||
pouchdb-server --level-backend redisdown | ||
Starts up a pouchdb-server that talks to Redis, on localhost:6379. | ||
Requires: npm install redisdown | ||
|
||
pouchdb-server --level-backend sqldown --level-prefix /tmp/ | ||
Starts up a pouchdb-server using SQLite, with files stored in /tmp/. | ||
Requires: npm install sqldown sqlite3 | ||
``` | ||
|
||
A simple example might be, | ||
|
||
```bash | ||
$ pouchdb-server -p 15984 | ||
pouchdb-server listening on port 15984. | ||
``` | ||
|
||
Alternatively, **pouchdb-server**'s functionality can be mounted into other Express web apps. For more information | ||
on that, check out [express-pouchdb](https://github.com/nick-thompson/express-pouchdb). | ||
|
||
## Fauxton | ||
|
||
**pouchdb-server** currently supports an experimental version of CouchDB's [Fauxton](http://docs.couchdb.org/en/latest/fauxton/index.html). Fauxton, the successor to CouchDB's original Futon, is a simple web UI for interacting with your databases. With your server running, navigate to `/_utils` to check it out! | ||
|
||
## Configuration | ||
|
||
By default, you can configure pouchdb-server using a `config.json` file, which is | ||
typically expected at the root of wherever you run pouchdb-server, but may be specified with the `--config` option. | ||
|
||
Below are some examples of `config.json` options: | ||
|
||
### log.level | ||
|
||
To change the log output level, you can create a `config.json` file containing e.g.: | ||
|
||
```js | ||
{ | ||
"log": { | ||
"level": "none" | ||
} | ||
} | ||
|
||
``` | ||
|
||
The available values are `debug`, `info`, `warning`, `error`, and `none`. The default | ||
is `info`. | ||
|
||
### log.file | ||
|
||
To choose the file where logs are written, you can create a `config.json` file containing e.g.: | ||
|
||
```js | ||
{ | ||
"log": { | ||
"file": "/path/to/log.txt" | ||
} | ||
} | ||
|
||
``` | ||
|
||
By default, logs are written to `./log.txt`. | ||
|
||
## Automatic port configuration | ||
|
||
Due to conventions set by Heroku and others, if you have a `PORT` environment variable, | ||
`pouchdb-server` will pick up on that and use it instead of `5984` as the default. | ||
|
||
```bash | ||
export PORT=3000 | ||
pouchdb-server # will run on port 3000 | ||
``` | ||
|
||
## Testing | ||
|
||
One of the primary benefits of **pouchdb-server** is the ability to run PouchDB's Node test suite against itself. To do that, you can simply, | ||
|
||
```bash | ||
$ npm run test-pouchdb | ||
``` | ||
|
||
Whatever args you provide as `SERVER_ARGS` will be passed to `pouchdb-server` itself: | ||
|
||
```bash | ||
$ SERVER_ARGS='--in-memory' npm run test-pouchdb | ||
``` | ||
|
||
Or to test in Firefox (IndexedDB): | ||
|
||
```bash | ||
$ CLIENT=selenium:firefox npm run test-pouchdb | ||
``` | ||
|
||
Or to test in PhantomJS (WebSQL): | ||
|
||
```bash | ||
$ CLIENT=selenium:phantomjs ES5_SHIM=true npm run test-pouchdb | ||
``` | ||
|
||
Additionally, we've started porting CouchDB's JavaScript test harness to | ||
[a simple Node module](https://github.com/nick-thompson/couchdb-harness), which can be run against PouchDB via **pouchdb-server**. | ||
|
||
```bash | ||
$ npm run test-couchdb | ||
``` | ||
|
||
## Contributing | ||
|
||
Want to help me make this thing awesome? Great! Here's how you should get started. | ||
|
||
1. First, make sure that the bugfix or feature you're looking to implement isn't better fit for [express-pouchdb](https://github.com/nick-thompson/express-pouchdb). | ||
2. PouchDB is still developing rapidly. If you need bleeding egde versions, you should first read how to [set up express-pouchdb for local development](https://github.com/nick-thompson/express-pouchdb#contributing). (Make sure that, afterwards, you `npm link` express-pouchdb). | ||
3. Go ahead and fork **pouchdb-server**, clone it to your machine. | ||
4. Now you'll want to, from the root of **pouchdb-server**, `npm link express-pouchdb`. | ||
5. `npm install` the rest of the dependencies. | ||
|
||
Please make your changes on a separate branch whose name reflects your changes, push them to your fork, and open a pull request! | ||
|
||
For commit message style guidelines, please refer to [PouchDB CONTRIBUTING.md](https://github.com/pouchdb/pouchdb/blob/master/CONTRIBUTING.md). | ||
See the CONTRIBUTING.md file for how to get involved | ||
|
||
## Contributors | ||
|
||
[These people](https://github.com/pouchdb/express-pouchdb/graphs/contributors) made **pouchdb-server** into what it is today! | ||
|
||
## Changelog | ||
|
||
`pouchdb-server` follows [semantic versioning](http://semver.org/). To see a changelog with all releases since v2.0.0, check out the [Github releases page](https://github.com/pouchdb/pouchdb-server/releases). | ||
[These people](https://github.com/pouchdb/pouchdb-server/graphs/contributors) made **pouchdb-server** into what it is today! | ||
|
||
## License | ||
|
||
Apache License Version 2.0. See [the LICENSE file](https://github.com/pouchdb/pouchdb-server/blob/master/LICENSE) for more information. | ||
The MIT License. See [the LICENSE file](https://github.com/pouchdb/pouchdb-server/blob/master/LICENSE) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
'use strict'; | ||
|
||
var PouchDB = require('pouchdb'); | ||
|
||
var app = require('../packages/node_modules/express-pouchdb')(PouchDB, { | ||
mode: 'minimumForPouchDB' | ||
}); | ||
app.listen(6984); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env node | ||
|
||
'use strict'; | ||
|
||
// Set the version of all modules, since they're versioned together. | ||
// Usage: npm run set-version -- [version] | ||
// e.g. npm run set-version -- 1.2.3 | ||
|
||
var version = process.argv[process.argv.length - 1]; | ||
var fs = require('fs'); | ||
var path = require('path'); | ||
|
||
var packages = fs.readdirSync('packages/node_modules'); | ||
|
||
packages.map(function (pkg) { | ||
return path.resolve(__dirname, '../packages/node_modules', pkg, 'package.json'); | ||
}).concat([ | ||
path.resolve(__dirname, '../package.json') | ||
]).forEach(function (jsonFile) { | ||
var json = JSON.parse(fs.readFileSync(jsonFile), 'utf-8'); | ||
json.version = version; | ||
fs.writeFileSync(jsonFile, JSON.stringify(json, null, ' ') + '\n', 'utf-8'); | ||
}); | ||
|
||
console.log('done'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
|
||
node ./bin/express-pouchdb-minimum-for-pouchdb.js & | ||
POUCHDB_SERVER_PID=$! | ||
|
||
cd ./pouchdb-tests | ||
|
||
COUCH_HOST=http://127.0.0.1:6984 TIMEOUT=120000 npm run test-node | ||
|
||
EXIT_STATUS=$? | ||
if [[ ! -z $POUCHDB_SERVER_PID ]]; then | ||
kill $POUCHDB_SERVER_PID | ||
fi | ||
exit $EXIT_STATUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
#!/bin/bash | ||
|
||
rm -fr tmp | ||
mkdir -p tmp | ||
cd tmp | ||
|
||
../bin/pouchdb-server -n -p 6984 $SERVER_ARGS & | ||
./packages/node_modules/pouchdb-server/bin/pouchdb-server -n -p 6984 $SERVER_ARGS & | ||
POUCHDB_SERVER_PID=$! | ||
|
||
cd ../pouchdb | ||
cd ./pouchdb-tests | ||
|
||
COUCH_HOST=http://127.0.0.1:6984 TIMEOUT=120000 npm run test-node | ||
COUCH_HOST=http://localhost:6984 TIMEOUT=120000 npm run test-node | ||
|
||
EXIT_STATUS=$? | ||
if [[ ! -z $POUCHDB_SERVER_PID ]]; then | ||
kill $POUCHDB_SERVER_PID | ||
fi | ||
exit $EXIT_STATUS | ||
exit $EXIT_STATUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,14 @@ | ||
#!/bin/bash | ||
|
||
# install pouchdb from git rather than npm, | ||
# so we can run its own tests | ||
# also this branch may change as we update pouchdb | ||
# versions because we can't necessarily test against | ||
# the master tests since we use the version of pouchdb | ||
# from npm | ||
rm -rf pouchdb | ||
git clone --single-branch \ | ||
--branch master \ | ||
--depth 300 \ | ||
https://github.com/pouchdb/pouchdb.git pouchdb | ||
cd pouchdb | ||
# using a specific commit for now rather than master | ||
git reset --hard 587ba8f4df4b6fcf32a8fd015f8c7ebadd8f280d | ||
DIRECTORY='pouchdb-tests' | ||
|
||
if [ ! -d "$DIRECTORY" ]; then | ||
# Control will enter here if $DIRECTORY exists. | ||
git clone --single-branch --branch master \ | ||
https://github.com/pouchdb/pouchdb.git ${DIRECTORY} | ||
fi | ||
|
||
cd pouchdb-tests | ||
npm install | ||
cd - | ||
|
||
cd .. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe link the CONTRIBUTING.md file?
[CONTRIBUTING.md](https://github.com/pouchdb/pouchdb-server/blob/master/CONTRIBUTING.md)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍