Skip to content

PacificGasAndElectric/SlipCover

Repository files navigation

Sync-Gateway-SlipCover open source

  • Quick and easy access to interact with Sync-Gateway documents.
  • More features implimented. View, Edit, Remove, Save, Downlaod, Search
  • User Friendly.

Table of Contents

Installation

yarn install

Run the project

yarn start

Stop the project

ctr + c

and then

yarn run docker-down

Stop all running containers

./docker-kill-all

This script will stop all running docker containers in case Couchbase/Sync-Gateway ports are being used somewhere else on your machine. You can run this script if the App won't start!

Run test coverage

yarn run cover

Dependencies

Details

  • Docker Compose manages running Sync-Gateway and Couchbase Server locally.

  • The data will be populated once the docker container finishes uploading the "beer-sample" bucket. The first time it runs, it takes ~50 seconds to run the docker script and upload ~7000 documents. The progress bar is set for ~55 sec to ensure all documents are uploaded.

View Mode

  • Shows a list of documents ID's
  • Ability to view, edit, remove, download a document from Sync-Gateway
  • Ability to search for a specific document

Edit Mode

  • Ability to save the changes into Sync-Gateway

Contributing

All contributions and suggestions are welcome!

For suggested improvements, please file an issue.

For direct contributions, please fork the repository and file a pull request. If you have never created a pull request, watch these quick tutorials here.

  1. Fork it (https://github.com/PacificGasAndElectric/SlipCover/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Personal Usage

If you want to use this project with your own Sync-Gateway:

  • modify manifest.js to add your own buckets.
bucket: ['beer-sample'],
  • Modify .env to change your end point.
REACT_APP_SYNC_GATEWAY="http://localhost:4984"
  • Remove the scripts from package.json.
"prestart": "docker-compose up --build -d",
"docker-down": "docker-compose down",
  • Bear in mind that the default behavior of fetch is to ignore the Set-Cookie header completely. To opt into accepting cookies from the server, you must use the credentials option.

For CORS requests, use the "include" value to allow sending credentials to other domains:

fetch('https://example.com:1234/users', {
  credentials: 'include'
})

License

MIT