!!!this is not the relay needed for METAVERSE-GUN by default; look for https://github.com/worldpeaceenginelabs/METAVERSE-GUN-RELAY instead!!!
Combine with https://github.com/worldpeaceenginelabs/DONATE-DECENTRALIZE-UI to offer your fanbase, gun relay donations to your website/app.
- npm install
- add your peers in server.js
- npm exec electron-packager . (the dot means "in the actual folder", without further arguments electron-packager compiles for the actual OS you are using to compile)
Make your desktop gun server available from the outside (centralized way, for development, fallback or scaling eventually)
https://www.noip.com/integrate/request (free user account neccessary)
To make your relay available on the internet, register for a free account on noip.com, download the client(all os available), then just start the electron gun in a console or run the compiled electron exe file. My clients have an entry peers: https://...relay.ddns.net
which connects to my electron gun on my notebook. (works great for testing everything out online)
cool thing: not much to change on your code for production. you just add more desktop or hosted relays and add them with commas to peers like peers: address.com, address2.com
You can use it to collect data 24/7 with your desktop relay from a subscribe form, or customer/user chat, or whichever datasource, which is on your static website on a CDN.
Without the need for any DynDNS service or centralized back-ends! Without the need to stay 24/7 online with your desktop!
!!!Heroku becomes unnecessary or fallback if you use Decentralized-STUN-Service. But this concept is for showing how to decentralize your back-end with gun for something simple like <input>
!!!
Run your own IP Lookup server (or multiple) if you like https://github.com/mpolden/echoip
A simple service for looking up your IP address. This is the code that powers https://ifconfig.co/
Gun + Public IP + Decentralized File Version
Peer-CDN https://rafallorenz.com/peer-cdn/docs/installation.html
Serve your website/apps build files from your gun nodes and peers.
The source-code of your website/app in this example comes from the desktop relay, but can come from anywhere you like.
A Gun based email server on your desktop. by by classic email provider! (take a look on Cloudflare Email Routing https://developers.cloudflare.com/email-routing/ to improve further)
feel free to add more use cases...