Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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;
},