How to use @node-red/editor-api - 6 common examples

To help you get started, we’ve selected a few @node-red/editor-api examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github node-red / node-red / packages / node_modules / node-red / lib / red.js View on Github external
if (!userSettings.SKIP_BUILD_CHECK) {
            checkVersion(userSettings);
        }

        if (!userSettings.coreNodesDir) {
            userSettings.coreNodesDir = path.dirname(require.resolve("@node-red/nodes"))
        }
        redUtil.init(userSettings);
        if (userSettings.httpAdminRoot !== false) {
            // Initialise the runtime
            runtime.init(userSettings,httpServer,api);
            // Initialise the editor-api
            api.init(userSettings,httpServer,runtime.storage,runtime);
            // Attach the runtime admin app to the api admin app
            api.httpAdmin.use(runtime.httpAdmin);

            apiEnabled = true;
            server = httpServer;
        } else {
            runtime.init(userSettings);
            apiEnabled = false;
            if (httpServer) {
                server = httpServer;
            } else {
                server = null;
            }
        }
        return;
    },
    /**
github node-red / node-red / packages / node_modules / node-red / lib / red.js View on Github external
httpServer = null;
        }

        if (!userSettings.SKIP_BUILD_CHECK) {
            checkVersion(userSettings);
        }

        if (!userSettings.coreNodesDir) {
            userSettings.coreNodesDir = path.dirname(require.resolve("@node-red/nodes"))
        }
        redUtil.init(userSettings);
        if (userSettings.httpAdminRoot !== false) {
            // Initialise the runtime
            runtime.init(userSettings,httpServer,api);
            // Initialise the editor-api
            api.init(userSettings,httpServer,runtime.storage,runtime);
            // Attach the runtime admin app to the api admin app
            api.httpAdmin.use(runtime.httpAdmin);

            apiEnabled = true;
            server = httpServer;
        } else {
            runtime.init(userSettings);
            apiEnabled = false;
            if (httpServer) {
                server = httpServer;
            } else {
                server = null;
            }
        }
        return;
    },
github node-red / node-red / packages / node_modules / node-red / lib / red.js View on Github external
*/
    get server() { return server },

    /**
     * The runtime api
     * @see @node-red/runtime
     * @memberof node-red
     */
    runtime: runtime,

    /**
     * The editor authentication api.
     * @see @node-red/editor-api_auth
     * @memberof node-red
     */
    auth: api.auth
};
github node-red / node-red / packages / node_modules / node-red / lib / red.js View on Github external
return runtime.start().then(function() {
            if (apiEnabled) {
                return api.start();
            }
        });
    },
github node-red / node-red / packages / node_modules / node-red / lib / red.js View on Github external
return runtime.stop().then(function() {
            if (apiEnabled) {
                return api.stop();
            }
        })
    },

@node-red/editor-api

@node-red/editor-api ====================

Apache-2.0
Latest version published 4 days ago

Package Health Score

92 / 100
Full package analysis

Similar packages