mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Make RED.stop as per @knollery suggestion.
This commit is contained in:
parent
1fb185d081
commit
e60120f7c9
4
red.js
4
red.js
@ -71,7 +71,7 @@ process.on('uncaughtException',function(err) {
|
||||
});
|
||||
|
||||
process.on('SIGINT', function () {
|
||||
RED.nodes.closedown();
|
||||
console.log("Exiting Node-RED. Thank you.");
|
||||
RED.stop();
|
||||
util.log('[red] Exiting Node-RED. Thank you.');
|
||||
process.exit();
|
||||
});
|
||||
|
12
red/red.js
12
red/red.js
@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
**/
|
||||
|
||||
var events = require("./events");
|
||||
var events = require("./events");
|
||||
var server = require("./server");
|
||||
var nodes = require("./nodes");
|
||||
var library = require("./library");
|
||||
@ -24,23 +24,23 @@ var settings = null;
|
||||
var events = require("events");
|
||||
|
||||
var RED = {
|
||||
|
||||
|
||||
init: function(httpServer,userSettings) {
|
||||
settings = userSettings;
|
||||
server.init(httpServer,settings);
|
||||
library.init();
|
||||
return server.app;
|
||||
},
|
||||
|
||||
|
||||
start: server.start,
|
||||
|
||||
nodes: nodes,
|
||||
library: library,
|
||||
events: events
|
||||
events: events,
|
||||
stop: nodes.closedown,
|
||||
};
|
||||
|
||||
RED.__defineGetter__("app", function() { return server.app });
|
||||
RED.__defineGetter__("server", function() { return server.server });
|
||||
RED.__defineGetter__("settings", function() { return settings });
|
||||
|
||||
module.exports = RED;
|
||||
module.exports = RED;
|
||||
|
Loading…
Reference in New Issue
Block a user