UNPKG

cloud-red

Version:

Serverless Node-RED for your cloud integration needs

34 lines (31 loc) 826 B
module.exports = function(RED) { 'use strict'; const createNode = require('../../node'); const Node = createNode(RED); class AWSConfig extends Node { /** * AWS Config Node * @param {Object} props - AWSConfig Properties * @param {string} props.stage - Stage to deploy the lambda * @param {string} props.profile - AWS profile */ constructor(props) { super(props); this.stage = props.stage; this.profile = props.profile; } } RED.nodes.registerType('aws-config', AWSConfig); // Open an admin port to serve stage information RED.httpAdmin.get( '/stages', RED.auth.needsPermission('config.read'), function(req, res) { res.json({ local: 'None (localhost)', personal: 'personal', boral: 'boral' }); } ); };