mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-07 21:21:52 +00:00
- Homebridge is now designed to be `npm install`d globally and executed via "homebridge" script - Remove all specific accessories/platforms except for an example - New internal structure and "cli"
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
var program = require('commander');
|
|
var hap = require("hap-nodejs");
|
|
var version = require('./version');
|
|
var Server = require('./server').Server;
|
|
var Plugin = require('./plugin').Plugin;
|
|
var User = require('./user').User;
|
|
|
|
'use strict';
|
|
|
|
module.exports = function() {
|
|
|
|
console.log("_____________________________________________________________________");
|
|
console.log("IMPORTANT: Homebridge is in the middle of some big changes.");
|
|
console.log(" Read more about it here:");
|
|
console.log(" https://github.com/nfarina/homebridge/wiki/Migration-Guide");
|
|
console.log("_____________________________________________________________________");
|
|
console.log("");
|
|
|
|
program
|
|
.version(version)
|
|
.option('-P, --plugin-path [path]', 'look for plugins installed at [path] as well as node_modules', function(p) { Plugin.addPluginPath(p); })
|
|
.option('-D, --debug', 'turn on debug level logging', function() { logger.setDebugEnabled(true) })
|
|
.parse(process.argv);
|
|
|
|
// Initialize HAP-NodeJS with a custom persist directory
|
|
hap.init(User.persistPath());
|
|
|
|
new Server().run();
|
|
}
|