-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Home
This wiki is where all the GUN website documentation comes from.
You can read it here or on the website, but the website has some special features like rendering some markdown extensions to create interactive coding tutorials.
Please feel free to improve the docs itself, we need contributions!
GUN STARTER KIT + QUICKSTART INSTRUCTIONS + ARTIFICIAL INTELLIGENCE PAIR PROGRAMMING
INSTALLATION: https://github.com/amark/gun/wiki/Installation
API: https://gun.eco/docs/API
GETTING STARTED on GitHub Wiki https://github.com/amark/gun/wiki/Getting-Started-(v0.3.x)
GETTING STARTED on GUN website (with interactive tutorials) https://gun.eco/docs/
React Tutorial https://github.com/amark/gun/wiki/React-Tutorial
React Video Tutorial https://youtu.be/Rc2sIPDrX_k
React Native Tutorial https://github.com/amark/gun/wiki/React-Native
gun-vue development setup and p2p db tooling https://youtu.be/4hpVRgVQvsY
Building a Decentralized Chat App using GUN.js and Svelte(2022) https://dev.to/envoy_/building-a-decentralized-chat-app-using-gunjs-and-svelte-29h6
Svelte Tutorial https://github.com/amark/gun/wiki/Svelte
Svelte Video Tutorial https://youtu.be/J5x3OMXjgMc
Vite https://github.com/amark/gun/wiki/Vite
GUN can be used in browsers, NodeJS, and mobile.
// server.js
const GUN = require('gun');
const server = require('http').createServer().listen(8080);
const gun = GUN({web: server});
// server.js
const http = require('http')
const Gun = require('gun')
// Uncomment for ES6, and remove requires above
// import http from 'http'
// import Gun from 'gun'
const server = http.createServer()
const host = 'localhost'
const port = 8080
var gun = Gun({
web: server,
peers: ['https://relayname.providername.com/gun']
})
server.listen(port, () => {
console.log(
'Server started on port ' + port + ' with /gun',
)
gun.get('test').on(data => console.log(data))
})
If you want to use import instead of require, just update your package.json file with "type":"module"
right after "main":
Making your code ES6 makes life a lot easier when it comes to needing async/await.
You can just await anywhere without needing an async function (but not inside constructors)
// server.js
import http from 'http'
import Gun from 'gun'
const server = http.createServer()
const host = 'localhost'
const port = 8080
var gun = Gun({
web: server,
peers: ['https://relayname.providername.com/gun']
})
server.listen(port, () => {
console.log(
'Server started on port ' + port + ' with /gun',
)
gun.get('test').on(data => console.log(data))
})
https://github.com/amark/gun/wiki/Browser
https://github.com/amark/gun/wiki/Node---HTTP
https://github.com/amark/gun/wiki/Server-with-basic-example-(gun-in-action)
https://www.heroku.com/deploy/?template=https://github.com/amark/gun
https://github.com/amark/gun/wiki/Local-Desktop-Gun-Relay-(Windows,-Linux,-MAC)
https://github.com/amark/gun/wiki/Android
https://github.com/amark/gun/wiki/RaspberryPi
A decentralized form handler with Gun for "static" JAMStack websites on a CDN. Plus "Svelte Compiler Tutorial with Gun"
https://github.com/worldpeaceenginelabs/FORM-GUN
Gun Relay Donation Tool - Taking the dev 1-click-deploy and turning it into a consumer 1-click deploy!
https://github.com/amark/gun/wiki/Gun-Relay-Donation-Tool