Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/timdeputter/purescript-gun
Purescript bindings to the gun.js database
https://github.com/timdeputter/purescript-gun
database gundb offline-first peer-to-peer purescript
Last synced: about 2 months ago
JSON representation
Purescript bindings to the gun.js database
- Host: GitHub
- URL: https://github.com/timdeputter/purescript-gun
- Owner: timdeputter
- License: mit
- Created: 2018-08-08T04:50:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-23T08:37:48.000Z (about 6 years ago)
- Last Synced: 2024-11-11T01:28:35.371Z (2 months ago)
- Topics: database, gundb, offline-first, peer-to-peer, purescript
- Language: PureScript
- Homepage:
- Size: 106 KB
- Stars: 2
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
purescript-gun [![Build Status](https://travis-ci.org/timdeputter/purescript-gun.svg?branch=master)](https://travis-ci.org/timdeputter/purescript-gun) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![purescript-gun on Pursuit](https://pursuit.purescript.org/packages/purescript-gun/badge)](https://pursuit.purescript.org/packages/purescript-gun)
==========Purescript bindings to the [gun.js](https://gun.eco) database.
## Installation
Install purescript-gun with bower:```sh
$ bower install purescript-gun
```## Getting started
Use `syncWithPeer` or `syncWithPeers` to connect to gun database.
```purescript
do
gundb -> liftEffect syncWithPeer "http://myserver.com/gun"
...
```After you've got a reference to a gundb instance, define a path with gun `get` and read data with `once`
```purescript
do
gundb -> liftEffect syncWithPeer "http://myserver.com/gun"
data -> gundb # get ["users", "friends"] # once
...
```Have a look at the test directory for more examples.
## Documentation
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-gun).
## License
Check [LICENSE](LICENSE) file for more information.