To run as a normal peer:
./peer
To run as a p2p server:
./peer server
Needs the config.json file:
{
"ip": "127.0.0.1",
"port": "3001",
"serverip": "127.0.0.1",
"serverport": "3000"
}
GET /
GET /peers
{
"PeerID": "VOnL-15rFsUiCnRoyGFksKvWKcwNBRz5iarRem0Ilvo=",
"peerslist": [
{
"id": "VOnL-15rFsUiCnRoyGFksKvWKcwNBRz5iarRem0Ilvo=",
"ip": "127.0.0.1",
"port": "3000",
"role": "server",
"conn": null
},
{
"id": "Lk9jEP1YcOAzl51yY61GdWADNe35_g5Teh12JeguHhA=",
"ip": "127.0.0.1",
"port": "3003",
"role": "client",
"conn": {}
},
{
"id": "xj78wuyN2_thFBsXOUXnwij4L8vualxQ9GnVRK6RS4c=",
"ip": "127.0.0.1",
"port": "3005",
"role": "client",
"conn": {}
}
],
"date": "0001-01-01T00:00:00Z"
}