0.0.17 • Published 2 years ago

sails-hook-p2p v0.0.17

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

sails-hook-p2p

Config example:

module.exports.p2p = {
  peers: [
    {
        host: 'string',
        port: 'number'
    }  
  ],
  lastUpdate: 'number',
  migrate: 'boolean',
  models: {
    public: ['test'],
    grab: ['test']
  },
  password: 'string',
  privateKey: 'string'
};

Config description:

nametypedescription
peersArray of peerarray of known peers
peerobjectdescribe each peer
peer.hoststringpeer host or ip
peer.portnumberpeer port
lastUpdatenumberhow old records from db need to copy
migratebooleanadd all old records needed fields
modelsobject or Array of stringdescribe what models can send to other peers and what can get. If it is array of string then public = grab = models
models.publicArray of stringdescribe what models need to send to others peers
models.grabArray of stringdescribe what models need to get from others peers
passwordstringpassword must be equal for servers in one mesh
privateKeystringssh key for https
0.0.10

2 years ago

0.0.11

2 years ago

0.0.12

2 years ago

0.0.13

2 years ago

0.0.14

2 years ago

0.0.15

2 years ago

0.0.9

2 years ago

0.0.16

2 years ago

0.0.17

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago