Skip to content
forked from Dletta/superPeer

Persistent Gun super peer supporting HTTP and HTTPS/SSL.

License

Notifications You must be signed in to change notification settings

bitnom/superPeer

 
 

Repository files navigation

superPeer

A persistent, SEA-enabled, gundb node server for deployment anywhere. This Super Peer runs a Gun node on both HTTP and HTTPS. Technically, it is running two nodes that are syncing with each-other locally. These behaviors can be enabled, disabled, and mix-matched.

Quickstart

First:

git clone https://github.com/TensorTom/superPeer.git
cd superpeer

If you're using SSL:

sed -i 's/example.com/yourdomain.com/g' index.js

If you're using LetsEncrypt:

cp /etc/letsencrypt/live/yourdomain.com/cert.pem cert/
cp /etc/letsencrypt/live/yourdomain.com/privkey.pem cert/

Then:

npm install
npm start

To run in background between terminal sessions (On Linux):

npm install supervisor -g
nohup npm run start-continuous > superPeer.out 2>&1 &

Options

useSSL=true // Enable the HTTPS server. If enabled, you must supply cert.pem and privkey.pem.

useHTTP=true // Enable the HTTP server.

peerify=true // Connect HTTP & HTTPS servers as peers of each-other, syncing data between them.

persistence=true // Store data synced from peers to disk.

port=8080 // Port to serve HTTP requests over. The default is compatible with Cloudflare.

sslPort=8443 // Port to server HTTPS over. The default is compatible with Cloudflare.

sslHost=example.com // This must be set to the domain matching your SSL certificate .pem files if useSSL == true.

Status

This superNode works well.

Gun issue 769 is now fixed and so I have upgraded this repo's gun to the latest version.

Misc

Source for Docker Hub Container included.

Original repo (Started as non-persistent, non-ssl): https://github.com/Dletta/superPeer.git

superPeer is also developing from TensorTom's fork: https://github.com/TensorTom/superPeer

License: MIT

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 79.5%
  • HTML 13.9%
  • Dockerfile 6.6%