Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Jabis Sevón
/
gun-multiserver
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
6f650761
authored
2020-04-17 15:24:03 +0200
by
Lorenzo Mangani
Committed by
GitHub
2020-04-17 15:24:03 +0200
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update README.md
1 parent
67745f3e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
1 deletions
README.md
README.md
View file @
6f65076
# GunDB MultiSocket
Single
`HTTP/S`
server providing
`WebSocket`
Path based routing to ephemeral
[
GunDB
](
https://gun.eco
)
instances for mesh isolation.
### Gun WS Flow
### Notes
*
The service MUST be served through SSL and can be deployed on
[
glitch
](
https://glitch.com/~gundb-multiserver
)
and other platforms.
### Installation
```
npm install
npm start
```
#### Gun WS Flow
<img
src=
"https://user-images.githubusercontent.com/1423657/79556065-d4b55e00-80a0-11ea-8a6a-b85aa0c90cf0.png"
width=
500/
>
#### Example
```
localStorage.clear();
var random1 = Math.random().toString(36).substring(7);
var gun1 = Gun({peers:["https://gundb-multiserver.glitch.me/"+random1], musticast: false, localStorage: false, radisk: false, file: false});
gun1.get('zero1').put({ name: "Jack" });
// This should be triggered
gun1.get('zero1').on(function(data, key){
console.log("gun 1 update:", data);
});
// This should never be triggered
gun1.get('zero2').on(function(data, key){
console.log("gun 1-2 update:", data);
});
var random2 = Math.random().toString(36).substring(7);
var gun2 = Gun({peers:["https://gundb-multiserver.glitch.me/"+random2], multicast: false, localStorage: false, radisk: false, file: false});
gun2.get('zero2').put({ name: "Jill"});
gun2.get('zero2').on(function(data, key){
console.log("gun 2 update:", data);
});
```
###### Credits
This project is a component of
[
Gun Meething
](
https://github.com/meething/webrtc-gun
)
powered by
[
GunDB
](
https://gun.eco
)
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment