Skip to content

matslundberg/couchdb_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CouchDB / PouchDB Tech demo

Super simple tech demo for CouchDB together with PouchDB. Very much inspired by the official PouchDB demo. Use for demo purpose only... :-)

To start

  1. Clone repository
  2. Run the following commands
cd couchdb-docker
docker build -t test/couchdb .
docker run -d -p 5984:5984 test/couchdb
cd ..
## Add CORS config in CouchDB
curl -X PUT http://127.0.0.1:5984/_config/httpd/enable_cors -d '"true"'
curl -X PUT http://127.0.0.1:5984/_config/cors/origins -d '"*"'
curl -X PUT http://127.0.0.1:5984/_config/cors/credentials -d '"true"'
curl -X PUT http://127.0.0.1:5984/_config/cors/methods -d '"GET, PUT, POST, HEAD, DELETE"'
curl -X PUT http://127.0.0.1:5984/_config/cors/headers -d '"accept, authorization, content-type, origin, referer, x-csrf-token"'
cd pouchdb-client
php -S localhost:8000
  1. Go to http://localhost:8000/ in two different tabs.
  2. Success!

About

CouchDB / PouchDB Tech demo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages