You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

gongo-client

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gongo-client

DX focused in-browser database with offline and realtime

2.8.2
latest
Source
npmnpm
Version published
Weekly downloads
42
Maintainers
1
Weekly downloads
 
Created
Source

gongo-client

WIP: DX focused in-browser database with offline and realtime.

Copyright (c) 2020 by Gadi Cohen. Released under the MIT License.

npm CircleCI coverage MIT License

Project

Main project page https://github.com/gongojs/project

Features

  • Client-side database. Offline first.
  • Subscribes to datasets, realtime support.
  • Optimistic updates for free.

QuickStart

import db from "gongo-client";
import HTTPTransport from "gongo-client/lib/transports/http";

// Should match your gongo-server setup; this is the serverless poll transport.
new HTTPTransport(db, "http://localhost:3001/api/gongoPoll");

const test = db.collection("test");
db.subscribe("test"); // subscribe to "test" publication (see gongo-server)
test.persist(); // persist this collection through browser restart

window.db = db; // so you can play in the browser console
window.test = test; // ditto

TODO

[ ] idb must store JSON compliant data (e.g. no Dates) [X] pending stuff shuold be stored in idb too [X] persist should be subscription-level and not collection-level [ ] webWorker implementation, with same API on main thread [ ] serviceWorker implementation with notifications

Keywords

database

FAQs

Package last updated on 09 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts