mirror of
https://github.com/mtan93/homebridge.git
synced 2026-03-18 05:10:57 +00:00
24 lines
527 B
JavaScript
Executable File
24 lines
527 B
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
//
|
|
// This executable sets up the environment and runs the HomeBridge CLI.
|
|
//
|
|
|
|
'use strict';
|
|
|
|
process.title = 'homebridge';
|
|
|
|
// Use babel to transparently enable ES6 features
|
|
require("babel/register");
|
|
|
|
// Find the HomeBridge lib
|
|
var path = require('path');
|
|
var fs = require('fs');
|
|
var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib');
|
|
|
|
// Export HomeBridge as a global for providers
|
|
global.homebridge = require(lib + '/homebridge');
|
|
|
|
// Run the HomeBridge CLI
|
|
require(lib + '/cli')();
|