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: 4 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 (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-23T08:37:48.000Z (over 6 years ago)
- Last Synced: 2025-01-25T13:07:07.418Z (5 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 [](https://travis-ci.org/timdeputter/purescript-gun) [](https://opensource.org/licenses/MIT) [](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.