Serving React App with node-red

Post Reply
bertankursun2
Posts: 12
Joined: Tue Nov 09, 2021 4:48 am

Serving React App with node-red

Post by bertankursun2 » Sat Jan 21, 2023 1:09 am

Hello!

We're trying to create a GUI to allow the user to interface with the PHL. We want to host the webpage on the device itself.

Is there a way to serve a React.js webpage to 10.0.0.1 like the GUI example with node-red?
If so, what is the best way to upload the HTML and JS files to the firmware or device?

Are we approaching this problem the correct way? Any help would be appreciated.

Thank you for your time.

hendrikkayser
Posts: 39
Joined: Fri May 10, 2019 7:58 am

Re: Serving React App with node-red

Post by hendrikkayser » Thu Jan 26, 2023 4:46 pm

Hello,
for Node-Red example I can only tell that the webserver comes with the Node-Red installation, so we didn't have to set up much in that regard. From here it seems that it is somehow possible by using the uibuilder node to use it for React.
For transferring files to the PHL you can use the scp command.

tobiasherzke
Posts: 119
Joined: Mon Jun 24, 2019 12:51 pm

Re: Serving React App with node-red

Post by tobiasherzke » Thu Feb 02, 2023 9:42 am

Searching for serve web pages with node-red finds a couple of hits that look relevant to your project.

That said, the PHL runs Linux on a 32 bit ARM processor, so any other common technology to serve web pages from Linux can be realized on the PHL, and may be cheaper, CPU-wise, than using node-red.

Post Reply