Skip to content

Latest commit

 

History

History

server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

VOUCH AGENCY Gun Relay Server

Gun relay server for vouch.agency browser peers.

This server is not necessary in order to run the Next.js app, but will enhance persistence and distribution between client peers.

Development

Create .env file:

$ cp .env.example .env

Copy the APP_ACCESS_TOKEN_SECRET from '/app/.env.local` to the new server .env. Generate and copy to the app .env if this value doesn't exist yet.

Install and start the server:

$ yarn
$ yarn start

The server runs on port 8765. To start with file watching, debugging and server reload enabled:

$ yarn watch
# instead of yarn start

Deploy

This server can be deployed anywhere (such as fly) and can exist in as many instances as needed.

Once deployed, the URLs of all relay peers should be set in Next.js app env variables as NEXT_PUBLIC_GUN_PEERS.