milosh012 / pouchdb

Using AngularJS and PouchDB to build a small app that syncs serverless and stores data persistently.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sync Multiple AngularJS Apps Without Server via PouchDB

This is a simple example from this blog post. Thanks to the @zeMirco!

Here is used AngularJS and PouchDB to build a small app that syncs serverless and stores data persistently. Changes are distributed automatically. They can be made inside the database, on any client or on any third party device that pushes changes to the connected CouchDB. AngularJS events update our models in the controller that pushes changes to our views via two-way data binding. It is possible to add todos to the app when offline and as soon you are back online.

Instalation:

  1. Install CouchDB
  2. Enable CORS in CouchDB (go to section httpd and set enable_cors to true)
  3. Navigate to the bottom of the page and click on Add a new section
section: cors;
option: origins;
value: *
  1. Create a new db "ng-db"

About

Using AngularJS and PouchDB to build a small app that syncs serverless and stores data persistently.


Languages

Language:JavaScript 100.0%