koro

an event time scheduler
git clone https://tilde.team/~marisa/repo/koro.git
Log | Files | Refs | README | LICENSE

commit c534deb5db44e0eb07233ff54241e2c597bcf0fc
parent eb5fe31b16e50ac2f2ee3cf4c336d04c7b25b74d
Author: mokou <mokou@posteo.de>
Date:   Thu, 21 May 2020 18:39:59 +0200

docs: Add CouchDB and Tailwind docs

Diffstat:
MREADME.md | 22++++++++++++++++++++++
1 file changed, 22 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -25,6 +25,28 @@ Navigate to [localhost:3000](http://localhost:3000). You should see your koro ru need a local database to work on the project - PouchDB works exactly like your own little in-browser CouchDB, and you can enable syncing with your local CouchDB when you're ready. +## CSS class purging + +We use Svelte's `class:classname={condition}` feature, which allows us to toggle classes based on certain circumstances. +However, this means that Tailwind's CSS purging feature will not recognize us as using these classes, and will get rid of +them. To circumvent this, we have to add all classes that we use with `class:classname` to Tailwind's whitelist located +in `tailwind.config.js`. + +## Syncing with CouchDB + +While this isn't required at all for development (unless you're working on something that regards the app's ability +to sync), it's pretty important when you deploy Koro. That being said, it's very easy to allow Koro to sync with an +external CouchDB instance. Simply put your connection string in the `KORO_COUCHDB_URL` environment variable. The +easiest way to do this is to create a `.env` file, which will automatically be read by Webpack. It would look like this: + +``` text +KORO_COUCHDB_URL=https://user:pass@mycouch.com/koro" +``` + +...where `koro` is the name of your database. That's it! Now Koro's PouchDB will attempt to replicate with your CouchDB +instance. For security, make sure you have a user that is only allowed to access your `koro` database, and set your CouchDB +CORS settings in a restrictive way. + ## Building and running in production mode To create an optimised version of the app: