无法在节点红色

时间:2017-12-06 14:58:25

标签: google-drive-api node-red

我正在尝试使用Node-Red制作Google云端硬盘上传节点。存在的那些并不适用于我想到的应用程序。它的PhotoBooth会被触发,照片会在公共文件夹中上传到Google云端硬盘

我一直在关注示例节点创建步骤,并且在运行node-red-start时似乎没有错误,并且链接我的新节点的步骤也可以正常工作。我的代码在github上提交 https://github.com/CuriosityGym/node-red-google-drive-upload

repo中有三个文件

的package.json

{
  "name": "node-red-google-drive-upload",
  "description": "Node Red Node for Uploading files to Google Drive Using Auth",
  "version": "1.0.0",
  "author": "Rupin Chheda<rupin@curiositygym.com>",
  "contributors": [
    {
      "name": "Rupin Chheda",
      "email": "rupin@curiositygym.com"
    }    
  ],
  "main": "index.js",  
  "repository": {
    "type": "git",
    "url": "https://github.com/CuriosityGym/node-red-google-drive-upload"
  },
  "bugs": {
    "url": "https://github.com/CuriosityGym/node-red-google-drive-upload/issues"
  },
  "dependencies": {
    "fs": "*",
    "readline": "*",
    "googleapis": "*",
    "google-auth-library": "*"

  }, 
  "license": "Apache-2.0",
  "node-red" : {
        "nodes": {
            "sample": "google-drive-upload.js"
        }
    }


}

谷歌驱upload.js

    module.exports = function(RED) {
    function LowerCaseNode(config) {
        RED.nodes.createNode(this,config);
        var node = this;
        node.on('input', function(msg) {
            msg.payload = msg.payload.toLowerCase();
            node.send(msg);
        });
    }
    RED.nodes.registerType("sample",LowerCaseNode);
}

谷歌驱upload.html

<script type="text/javascript">
    RED.nodes.registerType('sample',{
        category: 'function',
        color: '#a6bbcf',
        defaults: {
            name: {value:""}
        },
        inputs:1,
        outputs:1,

        label: function() {
            return this.name||"node-red-google-drive-upload";
        }
    });
</script>

<script type="text/x-red" data-template-name="sample">
    <div class="form-row">
        <label for="node-input-name"><i class="icon-tag"></i> Name</label>
        <input type="text" id="node-input-name" placeholder="Name">
    </div>
</script>

<script type="text/x-red" data-help-name="sample">
    <p>A simple node that converts the message payloads into all lower-case characters</p>
</script>

我在节点红色UI的左侧节点列表下看不到该节点。

请建议我可以更改以使其工作。 感谢

0 个答案:

没有答案