/kinto.js

An Offline-First JavaScript Client for Kinto.

Primary LanguageJavaScriptOtherNOASSERTION

Kinto.js

Build Status Coverage Status

An Offline-First JavaScript client for Kinto.

The idea is to persist data locally in the browser by default, then synchronizing them with the server explicitly when connectivity is guaranteed:

const kinto = new Kinto({remote: "https://kinto.dev.mozaws.net/v1/"});
const posts = kinto.collection("posts");

posts
  // Create and store a new post in the browser local database
  .create({title: "first post"})
  // Publish all local data to the server, import remote changes
  .then(_ => posts.sync());

Note: If you're looking for a pure HTTP js client for Kinto, check out kinto-client.

Documentation