Skip to content

Latest commit

 

History

History
26 lines (18 loc) · 457 Bytes

README.md

File metadata and controls

26 lines (18 loc) · 457 Bytes

Mosca MQTT Web Example:

Screenshot

Installation:

1. npm i

2. Start Server on port 3000:
    npm run server

3. Start Client 4on port 4200:
    npm run client

Auth over server:

var authenticate = function(client, username, password, callback) {
  var authorized = (username === 'alice' && password.toString() === 'secret');
  if (authorized) client.user = username;
  callback(null, authorized);
}