-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Home
Bo edited this page Jun 5, 2022
·
62 revisions
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!
GETTING STARTED WIKI: https://github.com/amark/gun/wiki/Getting-Started-(v0.3.x)
GETTING STARTED DOCS https://gun.eco/docs/
INSTALLATION: https://gun.eco/docs/Installation
Here is a simple gun relay server.
Start a new repo:
// server.js
;(function(){
var gun = require('gun/examples/http');
if(!gun.back){ return } // http example auto spawns subprocess
var fs = require('fs');
var server = gun.back('opt.web');
var route = server.route = {}
fs.readdir('./route', function(err, dir){
if(err || !dir){ return }
dir.forEach(function(file){
if(!file){ return }
route[file.split('.')[0]] = require('./route/'+file);
});
});
// with this line you can type a message on http://localhost:8765/basic/paste.html and check if the server works.
gun.get('test').on(data => console.log(data))
}());
-npm gun
-npm start
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