--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/43183d12-37de-48f4-a036-6083155cc448%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi Luka,do you mean in the runtime part of the node (provided by its .js file), or from within it's edit dialog in the editor (from the .html part)?Nick
On 10 February 2017 at 14:00, Luka Špoljarić <spolja...@gmail.com> wrote:
Hello,Im having a lot of trouble getting acces to external local javasript files from within my custom node I made.does anyone have any tips, and is it even possible?
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/ae598522-ca7f-4b54-bcfd-1bfbb961026e%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/_9QlC27T8c4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+unsubscribe@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAF%3DvhqdiV%3D0RVOF1v74digAZ9bRPw13Z33u4nbbGG9XaA5AMGw%40mail.gmail.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAJeDq0q4PxFPcSo8PyqEnS7Bs%3DQpGq-fbBh0XmOhSBiOt5tXsA%40mail.gmail.com.
module.exports = function (RED) {
"use strict"
var m2mdm = require("./m2mdm.js"); // external js hook
function validateInput(node){
if(node.doctorID == ""){
return false;
}
return true;
}
function createDoctor(config){
var prefix = require("../../config.json").user + "_";
RED.nodes.createNode(this, config);
this.doctorID = config.doctorID;
var node = this;
this.on("input", function(msg){
if(validateInput(node)) {
msg.type = "doctor";
msg.operation = "create";
msg.entityData = {
'urn': prefix + node.doctorID,
'attributes': [{
"name": "type",
"value": "DOCTOR"
}]
};
node.send (msg);
}
else
this.error("Please input expected arguments: doctorID");
})
}
RED.nodes.registerType("create-doctor", createDoctor);
}
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/ae598522-ca7f-4b54-bcfd-1bfbb961026e%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Node-RED" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/node-red/_9QlC27T8c4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.
To view this discussion on the web, visit https://groups.google.com/d/msgid/node-red/CAF%3DvhqdiV%3D0RVOF1v74digAZ9bRPw13Z33u4nbbGG9XaA5AMGw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--
http://nodered.org
Join us on Slack to continue the conversation: http://nodered.org/slack
---
You received this message because you are subscribed to the Google Groups "Node-RED" group.
To unsubscribe from this group and stop receiving emails from it, send an email to node-red+u...@googlegroups.com.
To post to this group, send email to node...@googlegroups.com.
Visit this group at https://groups.google.com/group/node-red.