Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

homebridge-syntex-magichome

Package Overview
Dependencies
Maintainers
1
Versions
423
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

homebridge-syntex-magichome - npm Package Compare versions

Comparing version 1.0.0-b32 to 1.0.0-b33

2

package.json
{
"name": "homebridge-syntex-magichome",
"version": "1.0.0-b32",
"version": "1.0.0-b33",
"description": "Homebridge Plugin for MagicHome LED Strips with preset scenes",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -30,3 +30,5 @@ const LightBulb = require('./accessories/lightBulb');

server.SETUP(logger, this.port);
server.SETUP('SynTexMagicHome', logger, this.port);
server.addPage('/test', '<h1>Hallo Welt</h1>', () => { logger.debug('TEST') });

@@ -33,0 +35,0 @@ lightAgent.setLogger(logger);

var server = exports;
var http = require('http');
var url = require('url');
var logger;
var logger, pages = [];
server.SETUP = function(log, port)
server.SETUP = function(prefix, log, port)
{

@@ -23,2 +23,13 @@ logger = log;

for(var i = 0; i < pages.length; i++)
{
if(urlPath == pages[i].path)
{
pages[i].callback();
response.write(pages[i].html);
response.end();
}
}
/*
if(urlPath == '/test')

@@ -29,3 +40,3 @@ {

}
*/
}).bind(this);

@@ -35,3 +46,10 @@

logger.log('info', 'bridge', 'Bridge', 'Data Link Server läuft auf Port [' + port + ']');
};
logger.log('info', 'bridge', 'Bridge', prefix + ' Server läuft auf Port [' + port + ']');
};
server.addPage() = function(path, html, callback)
{
pages.push({ path : path, html : html, callback : callback });
logger.debug(JSON.stringify(pages));
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc