mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
@@ -1,5 +1,5 @@
|
||||
/**
|
||||
* Copyright 2013, 2015 IBM Corp.
|
||||
* Copyright 2013, 2016 IBM Corp.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,8 @@ var os = require("os");
|
||||
|
||||
var runtimeMetricInterval = null;
|
||||
|
||||
var started = false;
|
||||
|
||||
var stubbedExpressApp = {
|
||||
get: function() {},
|
||||
post: function() {},
|
||||
@@ -142,6 +144,7 @@ function start() {
|
||||
log.info(log._("runtime.paths.settings",{path:settings.settingsFile}));
|
||||
}
|
||||
redNodes.loadFlows().then(redNodes.startFlows);
|
||||
started = true;
|
||||
}).otherwise(function(err) {
|
||||
console.log(err);
|
||||
});
|
||||
@@ -173,6 +176,7 @@ function stop() {
|
||||
clearInterval(runtimeMetricInterval);
|
||||
runtimeMetricInterval = null;
|
||||
}
|
||||
started = false;
|
||||
return redNodes.stopFlows();
|
||||
}
|
||||
|
||||
@@ -190,5 +194,8 @@ var runtime = module.exports = {
|
||||
events: events,
|
||||
nodes: redNodes,
|
||||
util: require("./util"),
|
||||
get adminApi() { return adminApi }
|
||||
get adminApi() { return adminApi },
|
||||
isStarted: function() {
|
||||
return started;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user