Socket
Socket
Sign inDemoInstall

node-red-contrib-mysql-config

Package Overview
Dependencies
12
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    node-red-contrib-mysql-config

Fork of node-red-contrib-stackhero-mysql that allows config to be set via environment variables.


Version published
Weekly downloads
707
decreased by-17.31%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

node-red-contrib-mysql-config

Node-RED node to read and write to a MySQL or a MariaDB database.

Foreword

Note: All credit for this work goes to the original creator(s): https://github.com/stackhero-io/node-red-contrib-stackhero-mysql

This is a fork for the purpose of configuring a connection using environment variables.

Use Case

The primary use case for using this version is in instances where NodeRED changes are being deployed using CI/CD pipelines across multiple environments and credentials need to be configured using environment variables as opposed to manually setting them in the NodeRED UI.

Configuration

In order to configure this node, set each of the inputs with it's environment variable name.

Usage

This node is really simple.

Put your query in the topic variable and, if you have arguments, put them in an object in the payload variable. You will get the result in the payload output variable.

Example:

msg.topic = 'SELECT * FROM `users` WHERE `name` = :name AND `age` > :age;';
msg.payload = { name: 'Adrien', age: 30 };
return msg;

Avoid SQL injections!!

Do not NEVER EVER put variables content in topic directly! Always use the payload variable to pass your arguments.

Keywords

FAQs

Last updated on 18 Jul 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc