visit
Here will use IBM Cloud to host our Node-RED, it's the best choice after exploring so many options (AWS, Azure & GCP). The integration is seamless. Node-RED is a pre-built IBM cloud service which comes under the free-tier services of Lite Plan. IBM cloud doesn't need Credit Card to avail it's Lite plan. You just need to sign-up, follow the below instructions and Ready to Go. Though it is an always free service, but Lite plan services deleted after 30 days of inactivity, there are some other limitations, kindly read them (refer below) before proceeding.
1. Once you , to Login to IBM Cloud. Next, click on the catalog (1) and search for node-red (2). Click on the Software tab (3). Click on the Node-RED App tile (4), this will show you an overview of the Starter Kit and what it provides.
2. Click on the Create app button (1) to continue. Open Tutorial (2) in a new tab and follow the steps from 2 to 5 to host the Node-RED app. It is always better to learn from the maker. Also, want to keep the document minimalistic to discuss a few important stuff with Readers. Alternatively, to redirect to Tutorial - Create a Node-RED starter app (Follow Step 2 - 5).
3. Once you are done, you are able to access your Node-RED Editor, using cloud foundry Visit App URL (e.g. ), keep it handy. Meanwhile, you have provisioned a Node-RED on IBM Cloud with SSL certificate and the Editor is protected from anonymous access.
Warning:
The following URL also works on http so avoid using // instead use
//
.
2. Click Runtime (1) from the sidebar and then select Environment variables (2).
NODE_RED_USERNAME
- the username to secure the editor withNODE_RED_PASSWORD
- the password to secure the editor withNODE_RED_GUEST_ACCESS
- set to true
(case sensitive) to allow anonymous users to have read-only access to the editor, this is not recommended. 1. Login to Node-RED editor, click on the menu button (three parallel horizontal lines) in the top right corner and select Manage Palette. It will open a new window (User Settings) , select Install tab (1) & search (2)
httpauth
, and install (3) node-red-contrib-httpauth. Acknowledge the warning and, click Install and wait until you see Installed. 2. We will use a predefined flow and import it in the Node-RED. to download the flows.json (Hit Save as and keep it on your local machine). Next, click on the menu button (three parallel horizontal lines) in the top right corner and select Import and pick the flows.json file. After that, a new tab (Secure Endpoint) will load the below schematic. Feel free to double-click the blocks and check the configuration settings.
3. Now, Double Click on the http auth block, it will open a new tab. Select Auth Type Digest (1), put Username (2) and Password (3), Click Done (4) and finally Click Deploy (5) at the top right corner.
4. Now, to test whether the authentication is working or not? In your browser put the Node-RED URL and append
/test
(e.g. ), put your username and password for authentication & then will navigate to secure web endpoint 🤗. If you are wondering, why /test appended?
🤔 Don't worry, you can change the same just Double-Click the [get] /Test
Block as shown below and change the /test
with your desired /path component.Warning:
If you provision a new flow, either keep the same username and password in your
http auth block
else you need to enter the credentials each time) or use the same http auth block as shown below.
Congratulations on completing the tutorial. It is an immense pleasure to see you here and reading this, I thank you individually. Stay curious and if you want more tutorials do let me know on LinkedIn.
Kindly Share & Comment only if you find it useful and help me on my mission to educate and familiarize people in the world of digitization 💪 #This is a Free tutorial and all my upcoming tutorials will be free and accessible from Public forums.# Appreciate if you drop me a note on
& share your opinion. Don't worry, I don't bite 👻 so don't shy away 🏃🏻♀️ 🏃🏻. Your feedback will help me to come up with more awesome contents on the internet. Check my other tech stories & tutorials @
//gzht888.com/@gourav-das