You can clone with
This should be a simple matter of mapping http to pouch calls, and will let us replicate from idb to node
Guessing this isn't referring to the http client, but rather a server mapping HTTP requests to pouch calls?
Yup, so the http client could talk to a node instance on a server
Interesting, I hadn't thought of using it that way. Figured if you need a server, just use Couch. What would the API for running that server look like?
Or would it be a command-line tool:
$ pouchserver ldb://mydb
I tend to make my modules both consumed by CL and by other modules, a lot of people have asked to be able to use pouch as a mini couch replacement to get up and running, but as you said if you want a server then couchdb is there so this is really low down on the list of things to get done
Chris Anderson mentioned another really good reason to do this, CouchDB has a huge extensive test suite that runs against a running couchdb, with a http adapter we could run it against PouchDB
That's a good point. I think it would be a good idea to create a separate project/module for this, to keep server-specific code and dependencies out of the main pouchdb project.
An awesome part about this craziness is we can write a single simple http library that works in both the browser and on the server.
@tilgovi any chance you can point people to the right repo's and the basic steps to get your plugin up and running?
I started working on this here. It's pretty early on, but currently it satisfies something like the first 40 http tests from the pouch test suite and I hope to have many more than that by the end of the day. You can use it directly as a drop-in replacement for couch, by which I mean if you shut off our local couch server and spin this node instance up on port 5984, you can run the pouch test suite verbatim.
If you have suggestions or feedback or anything, please let me know! I'm more than happy to adapt my implementation to fit the right needs.
This is perfect, thanks
One thing is, your uuid implementation is nice but the fact you had to do it shows a gap in our implementation, its a tricky gap since the best API for these type of global resources is tricky, but thats one of the reasons for doing this.
So I would keep it as is and work on the implementation to get the test passing, but make a note, maybe file an issue that we need to replace that implementation with one that works on pouch plain
So a bunch of people want to test this out, I prefer to keep the person writing the code to publish it since it just makes it obvious who / where to go to, if you would be able to publish it on npm that would be awesome, its really easy to get that working
Moar updates, w00t.
I've renamed the repository from "pouch-server" to "pouchdb-server", so existing links that you may find around this subject will likely be broken; here's a valid link: https://github.com/nick-thompson/pouchdb-server.
The package is now published to npm, and can be installed with npm install pouchdb-server, but read the documentation in the README linked above before you jump into that; there's an alternative install method that's preferred if you intend to run the test suites.
npm install pouchdb-server
As of now, pouchdb-server passes the full PouchDB test suite, both via node and the browser. Next steps include maintaining that status as well as porting the CouchDB server over for more extensive testing.
Suggestions/feedback welcome, as always!
Awesome, that'll be really cool to play with. I don't know much about how the chrome app server is structured, but if you think it'd be a clean integration into pouchdb-server, then I'd be happy to accept a PR!
I think we are good to close this now :D awesome job