dsmnet

Decentalized Secure Messaging Network

#DSMNET Server Module ##START (users, key) start() requiures two arguements, the first is users and the second is key which is optinal and should only be used by experienced users. Start() will create two DSMNET servers, the first being HTTP on port 3265 and a socket.IO server 3266.

###users The Users variable should be in JSON format.
Each user should have their own JSON {}.
Here is an example Users variable:

var users = {user : 
{publickey : 
'16WFRVsY/5ypA8s+31JsdeiD6HBlFex+eUxt2wHMCEA9KMzwHOT+bmkm5GNew+CaUtz1kCSTUitXJBCisIRDLbq5SfCmt6n1aRqYLiyR8LJ0gThXKzPQj5lxfWEEvcyZ4nAmrezLuES7qdW9+FIohPUKo6HO+B6zEdf9tSBE2RiODQ+ROIJyp9SatNEbGwHHr8l40ncSChF3Ly0TZ5I1tWj7pY4Y/yl3kTiAwptq0/lXLFhGxfj+XykmKY6zbQyKDjhWv6OtFyRKeQKvqWEy/Z5KHnFfTvMHH00fRWL9+R0ZQi6uKsp7UBrFIslbpBROpN98kLnccKJWqJPSvtIdFw==', 
online : "false", 
subscribers : [], 
subscribedto : []}};

Each user should have a publickey which is the publickey of their password, and online : "false" and two empty variables called subscribers (array) and subscribedto (array).

###key - optinal The key variable should be a string. The key variable is used to generate a RSAkey which will be used for authentication of users, only. It is optinal and thus we do not advise you use a custom key as our module will generate one for you.

Example key: 'password5555