Skip to content

Latest commit

 

History

History
29 lines (16 loc) · 1.19 KB

todo-list-tutorial.md

File metadata and controls

29 lines (16 loc) · 1.19 KB

layout: default title: Simple todo list with sync

Simple todo list with sync

This short tutorial shows the very simple application using pouchdb. It replaces todomvc todos’ localStorage with pouchdb.

First you need to start with cloning pouchdb:

https://github.com/daleharvey/pouchdb

After that we go straight away to our example todo-list located in tutorials.

To run it - due to CORS - you need to put it onto your webserver or start your own. If you have python2 just try: (http.server in python 3)

python2 -m SimpleHTTPServer 8888

Then simply run our example: http://localhost:8888. Unfortunately, sync doesn’t work yet.

Sync

More difficult part concerns couchdb server we want to sync our data to.

If you already have one - you just simply edit the remove variable in app.js file. (you need to create database called todos)

Otherwise, follow couchdb’s tests tutorial to get couchdb and cors-server up and running. Create todos database and you are ready to go.