mirror of
https://github.com/amark/gun.git
synced 2025-03-30 15:08:33 +00:00
Update README.md
This commit is contained in:
parent
4499562e34
commit
34a6d2def3
165
README.md
165
README.md
@ -1,22 +1,15 @@
|
||||
<h1>
|
||||
<a href="http://gundb.io">
|
||||
<img src='https://cldup.com/TEy9yGh45l.svg'
|
||||
width='40%'
|
||||
style='float:right;'
|
||||
alt="gun" />
|
||||
</a>
|
||||
<img width='15%'>
|
||||
<a href="http://gun.js.org">
|
||||
<img src='http://gun.js.org/see/demo.gif'
|
||||
width='40%'
|
||||
alt="gun" />
|
||||
</a>
|
||||
</h1>
|
||||
<table>
|
||||
<tr>
|
||||
<td align="left" width="40%" style="border: 0;"><a href="http://gun.js.org/"><img src="https://cldup.com/TEy9yGh45l.svg"/></a></td>
|
||||
<td align="middle" width="10%" style="border: 0;"></td>
|
||||
<td align="right" width="40%" style="border: 0;"><img src="http://gun.js.org/see/demo.gif"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
[](https://www.npmjs.com/package/gun)
|
||||
[](https://travis-ci.org/amark/gun)
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Famark%2Fgun?ref=badge_shield)
|
||||
[](https://gitter.im/amark/gun)
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Famark%2Fgun?ref=badge_small)
|
||||
|
||||
GUN is a realtime, distributed, offline-first, graph database engine. Doing **[20M+](https://github.com/amark/gun/wiki/100000-ops-sec-in-IE6-on-2GB-Atom-CPU) ops/sec** in just **~9KB** gzipped.
|
||||
|
||||
@ -33,7 +26,7 @@ GUN is a realtime, distributed, offline-first, graph database engine. Doing **[2
|
||||
## Quickstart
|
||||
|
||||
- Try the [interactive tutorial](http://gun.js.org/think.html) in the browser (**5min** ~ average developer).
|
||||
- Or run the NodeJS examples `npm install gun && cd node_modules/gun && npm start` (**5min** ~ average developer).
|
||||
- Or `npm install gun` and run the examples with `cd node_modules/gun && npm start` (**5min** ~ average developer).
|
||||
|
||||
> **Note:** If you don't have [node](http://nodejs.org/) or [npm](https://www.npmjs.com/), read [this](https://github.com/amark/gun/blob/master/examples/install.sh) first.
|
||||
> If the `npm` command line didn't work, you may need to `mkdir node_modules` first or use `sudo`.
|
||||
@ -57,26 +50,94 @@ gun.get('mark').on(function(data, key){
|
||||
});
|
||||
</script>
|
||||
```
|
||||
- Or try something mind blowing, like saving circular references to a table of documents! ([play](http://jsbin.com/wefozepume/edit?js,console))
|
||||
```javascript
|
||||
var cat = {name: "Fluffy", species: "kitty"};
|
||||
var mark = {boss: cat};
|
||||
cat.slave = mark;
|
||||
|
||||
// partial updates merge with existing data!
|
||||
gun.get('mark').put(mark);
|
||||
|
||||
// access the data as if it is a document.
|
||||
gun.get('mark').get('boss').get('name').val(function(data, key){
|
||||
// `val` grabs the data once, no subscriptions.
|
||||
console.log("Mark's boss is", data);
|
||||
});
|
||||
|
||||
// traverse a graph of circular references!
|
||||
gun.get('mark').get('boss').get('slave').val(function(data, key){
|
||||
console.log("Mark is the slave!", data);
|
||||
});
|
||||
|
||||
// add both of them to a table!
|
||||
gun.get('list').set(gun.get('mark').get('boss'));
|
||||
gun.get('list').set(gun.get('mark'));
|
||||
|
||||
// grab each item once from the table, continuously:
|
||||
gun.get('list').map().val(function(data, key){
|
||||
console.log("Item:", data);
|
||||
});
|
||||
|
||||
// live update the table!
|
||||
gun.get('list').set({type: "cucumber", goal: "scare cat"});
|
||||
```
|
||||
|
||||
## Support
|
||||
|
||||
- Help support development: https://www.patreon.com/gunDB !
|
||||
<p align="center">
|
||||
Thanks to:<br/>
|
||||
<a href="http://qxip.net/"><img src="http://qxip.net/images/qxip_logo.png" width="100"></a><br/>
|
||||
<a href="http://github.com/samliu">Sam Liu</a>,
|
||||
<a href="http://github.com/ddombrow">Daniel Dombrowsky</a>,
|
||||
<a href="http://github.com/vincentwoo">Vincent Woo</a>,
|
||||
<a href="http://github.com/coolaj86">AJ ONeal</a>,
|
||||
<a href="http://github.com/ottman">Bill Ottman</a>,
|
||||
<a href="http://github.com/ctrlplusb">Sean Matheson</a>,
|
||||
<a href="http://github.com/alanmimms">Alan Mimms</a>
|
||||
</p>
|
||||
|
||||
- Join others in sponsoring code: https://www.patreon.com/gunDB !
|
||||
- Ask questions: http://stackoverflow.com/questions/tagged/gun ?
|
||||
- Chat with us: https://gitter.im/amark/gun .
|
||||
- Found a bug? Report at: https://github.com/amark/gun/issues ;
|
||||
- **Need help**? Chat with us: https://gitter.im/amark/gun .
|
||||
|
||||
|
||||
## Documentation
|
||||
- [API reference](https://github.com/amark/gun/wiki/API).
|
||||
- [**A must read crash course on using GUN**](https://github.com/amark/gun/wiki/graphs).
|
||||
- [Introductory Guide](https://github.com/amark/gun/wiki/getting-started-(v0.3.x)).
|
||||
- [What tradeoffs does GUN make](https://github.com/amark/gun/wiki/CAP-Theorem)? It is an AP system, so banking apps aren't a good fit.
|
||||
- [How the Conflict Resolution algorithm works](http://gun.js.org/distributed/matters.html).
|
||||
- Check out and add example code [snippets](https://github.com/amark/gun/wiki/snippets-(v0.3.x)) —including micro-modules— to address specific situations.
|
||||
- Loose [roadmap](https://github.com/amark/gun/wiki/roadmap).
|
||||
- A [React tutorial](https://github.com/amark/gun/wiki/React-Tutorial).
|
||||
- See this [module for GraphQL support](https://github.com/brysgo/graphql-gun).
|
||||
- [A React example](https://github.com/amark/gun/tree/master/examples/react).
|
||||
- [An Angular example](https://github.com/amark/gun/tree/master/examples/angular).
|
||||
- [Some VueJS examples](https://github.com/amark/gun/tree/master/examples/vue).
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/wiki/API">API reference</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="http://gun.js.org/think.html">Tutorials</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/tree/master/examples">Examples</a></h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/brysgo/graphql-gun">GraphQL</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/PenguinMan98/electrontest">Electron</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/staltz/gun-asyncstorage">Native</a></h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/sjones6/vue-gun">Vue</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/wiki/React-Tutorial">React</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/Stefdv/gun-ui-lcd#syncing">Webcomponents</a></h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/wiki/CAP-Theorem">CAP Theorem Tradeoffs</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="http://gun.js.org/distributed/matters.html">How Data Sync Works</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/wiki/porting-gun">How GUN is Built</a></h3></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/wiki/auth">Crypto Auth</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/wiki/Modules">Modules</a></h3></td>
|
||||
<td style="border: 0;"><h3><a href="https://github.com/amark/gun/wiki/roadmap">Roadmap</a></h3></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
This would not be possible without **community contributors**, big shout out to:
|
||||
|
||||
**[BrockAtkinson](https://github.com/BrockAtkinson) ([brunch config](https://github.com/BrockAtkinson/brunch-gun))**; **[Brysgo](https://github.com/brysgo) ([GraphQL](https://github.com/brysgo/graphql-gun))**; **[d3x0r](https://github.com/d3x0r) ([SQLite](https://github.com/d3x0r/gun-db))**; **[forrestjt](https://github.com/forrestjt) ([file.js](https://github.com/amark/gun/blob/master/lib/file.js))**; **[JosePedroDias](https://github.com/josepedrodias) ([graph visualizer](http://acor.sl.pt:9966))**; **[JuniperChicago](https://github.com/JuniperChicago) ([cycle.js bindings](https://github.com/JuniperChicago/cycle-gun))**; **[jveres](https://github.com/jveres) ([todoMVC](https://github.com/jveres/todomvc))**; **[kristianmandrup](https://github.com/kristianmandrup) ([edge](https://github.com/kristianmandrup/gun-edge))**; [PsychoLlama](https://github.com/PsychoLlama) ([LevelDB](https://github.com/PsychoLlama/gun-level)); **[RangerMauve](https://github.com/RangerMauve) ([schema](https://github.com/gundb/gun-schema))**; **[robertheessels](https://github.com/swifty) ([gun-p2p-auth](https://github.com/swifty/gun-p2p-auth))**; [sbeleidy](https://github.com/sbeleidy); **[Sean Matheson](https://github.com/ctrlplusb) ([Observable/RxJS/Most.js bindings](https://github.com/ctrlplusb/gun-most))**; **[Stefdv](https://github.com/stefdv) (Polymer/web components)**; **[sjones6](https://github.com/sjones6) ([Flint](https://github.com/sjones6/gun-flint))**;
|
||||
|
||||
I am missing many others, apologies, will be adding them soon!
|
||||
|
||||
## Deploy
|
||||
|
||||
@ -103,6 +164,7 @@ Then visit the URL in the output of the 'heroku create' step, in a browser.
|
||||
npm install -g now
|
||||
now --npm amark/gun
|
||||
```
|
||||
|
||||
Then visit the URL in the output of the 'now --npm' step, in your browser.
|
||||
|
||||
### [Docker](https://www.docker.com/)
|
||||
@ -126,52 +188,19 @@ docker run -p 8080:8080 myrepo/gundb:v1
|
||||
|
||||
Or, if you prefer your Docker image with metadata labels (Linux/Mac only):
|
||||
|
||||
```bash
|
||||
```bash
|
||||
npm run docker
|
||||
docker run -p 8080:8080 usenameHere/gun:git
|
||||
```
|
||||
|
||||
Then visit [http://localhost:8080](http://localhost:8080) in your browser.
|
||||
|
||||
|
||||
### Videos
|
||||
- [Fault tolerance](https://www.youtube.com/watch?v=-i-11T5ZI9o&feature=youtu.be) (01:01)
|
||||
- [Saving relational or document based data](https://www.youtube.com/watch?v=cOO6wz1rZVY&feature=youtu.be) (06:59)
|
||||
- [Everything you want to know about GUN](https://youtu.be/qJNDplwJ8aQ) (57:50) 1.25x speed recommended.
|
||||
- [GUN's YouTube channel](https://www.youtube.com/channel/UCQAtpf-zi9Pp4__2nToOM8g/playlists) also has videos.
|
||||
|
||||
### <a name="gun-projects"></a>Projects
|
||||
- GUN users are encouraged to add their projects to this [running projects list](https://github.com/amark/gun/wiki/projects).
|
||||
|
||||
## <a name="gun-modules"></a>Modules
|
||||
GUN is designed to be as minimal as possible, with any additional functionality being provided via modules. Please refer to the [modules](https://github.com/amark/gun/wiki/modules) page for a list of existing extensions. Please refer to the [gun-extensions](https://github.com/gundb/gun-extensions/issues) repo to see what extensions have been requested or to request an extension.
|
||||
|
||||
## How can I help make gun even more awesome?
|
||||
- Star this repo
|
||||
- Follow us and share your appreciation via [Gitter](https://gitter.im/amark/gun), [Twitter](https://twitter.com/databasegun), [LinkedIn](https://www.linkedin.com/company/gun-inc), and [Facebook](https://www.facebook.com/databasegun)
|
||||
- [Share projects you've written](https://github.com/amark/gun/wiki/projects)
|
||||
- [Build extensions or squish bugs](https://waffle.io/amark/gun)
|
||||
- If you are working on an extension, familiarize yourself with [GUN's Module API](https://github.com/amark/gun/wiki/Building-Modules-for-Gun)
|
||||
|
||||
## License
|
||||
|
||||
Designed with ♥ by Mark Nadal, the gun team, and many amazing contributors. Liberally licensed under [Zlib / MIT / Apache 2.0](https://github.com/amark/gun/blob/master/LICENSE.md).
|
||||
Designed with ♥ by Mark Nadal, the GUN team, and many amazing contributors.
|
||||
|
||||
Openly licensed under [Zlib / MIT / Apache 2.0](https://github.com/amark/gun/blob/master/LICENSE.md).
|
||||
|
||||
[](https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Famark%2Fgun?ref=badge_large)
|
||||
|
||||
## Contributors
|
||||
|
||||
Thanks to the following people who have contributed to GUN, via code, issues, or conversation (this list has quickly become tremendously behind! We'll probably turn this into a dedicated wiki page so you can add yourself):
|
||||
|
||||
[agborkowski](https://github.com/agborkowski); **:star:[alanmimms](https://github.com/alanmimms)**; [alexlafroscia](https://github.com/alexlafroscia); [anubiann00b](https://github.com/anubiann00b); **[BrockAtkinson](https://github.com/BrockAtkinson) ([brunch config](https://github.com/BrockAtkinson/brunch-gun))**; [bromagosa](https://github.com/bromagosa); **[Brysgo](https://github.com/brysgo) ([GraphQL](https://github.com/brysgo/graphql-gun))**; [coolaj86](https://github.com/coolaj86); **:star:[Dan Dombrowsky](https://github.com/ddombrow)**; [d-oliveros](https://github.com/d-oliveros), [danscan](https://github.com/danscan); **[forrestjt](https://github.com/forrestjt) ([file.js](https://github.com/amark/gun/blob/master/lib/file.js))**; [gedw99](https://github.com/gedw99); [HelloCodeMing](https://github.com/HelloCodeMing); **[JosePedroDias](https://github.com/josepedrodias) ([graph visualizer](http://acor.sl.pt:9966))**; **[JuniperChicago](https://github.com/JuniperChicago) ([cycle.js bindings](https://github.com/JuniperChicago/cycle-gun))**; **[jveres](https://github.com/jveres) ([todoMVC](https://github.com/jveres/todomvc))**; **[kristianmandrup](https://github.com/kristianmandrup) ([edge](https://github.com/kristianmandrup/gun-edge))**; [ndarilek](https://github.com/ndarilek); [onetom](https://github.com/onetom); [phpnode](https://github.com/phpnode); [PsychoLlama](https://github.com/PsychoLlama); **[RangerMauve](https://github.com/RangerMauve) ([schema](https://github.com/gundb/gun-schema))**; **[robertheessels](https://github.com/swifty) ([gun-p2p-auth](https://github.com/swifty/gun-p2p-auth))**; [riston](https://github.com/riston); [rootsical](https://github.com/rootsical); [rrrene](https://github.com/rrrene); **:star:[samliu](https://github.com/samliu)**; [sbeleidy](https://github.com/sbeleidy); **:star:[Sean Matheson](https://github.com/ctrlplusb) ([Observable/RxJS/Most.js bindings](https://github.com/ctrlplusb/gun-most))**; [ssr1ram](https://github.com/ssr1ram); **[Stefdv](https://github.com/stefdv) (Polymer/web components)**; **[sjones6](https://github.com/sjones6) ([VueJS](https://github.com/sjones6/vue-gun))**; [Xe](https://github.com/Xe); [zot](https://github.com/zot); [ayurmedia](https://github.com/ayurmedia);
|
||||
|
||||
This list of contributors was manually compiled and alphabetically sorted. If we missed you, please submit an issue so we can get you added!
|
||||
|
||||
## [Changelog](https://github.com/amark/gun/blob/master/CHANGELOG.md#03)
|
||||
|
||||
Also see the current [Release List](https://github.com/amark/gun/releases) and [Tag List](https://github.com/amark/gun/tags) for quick access to relevant versions.
|
||||
|
||||
<a name="stay-up-to-date"></a>
|
||||
|
||||
<a href="https://gitter.im/amark/gun"><img alt="Gitter channel" src="https://badges.gitter.im/Join%20Chat.svg" /></a>
|
||||
[](https://www.youtube.com/channel/UCQAtpf-zi9Pp4__2nToOM8g) [](https://www.linkedin.com/company/gun-inc) [](https://twitter.com/databasegun)
|
||||
[YouTube](https://www.youtube.com/channel/UCQAtpf-zi9Pp4__2nToOM8g) . [Twitter](https://twitter.com/marknadal)
|
||||
|
Loading…
x
Reference in New Issue
Block a user