I'm currently working on deploying the Node-RED server on a Windows server, and I have some specific requirements to fulfill. Here's what I've done so far:
Installed Node-RED
Run 'npm run dev'
After these steps, I'm able to access the server thought localhost.
However, my goal is to integrate it with IIS (Internet Information Services). To achieve this, I added a "web.config" file pointing to "packages/node_modules/node-red/red.js" . But upon trying to access it, I encountered an error stating that it couldn't create the ".node-red" folder.
To solve this issue, I manually created the folder and its necessary files. However, now I'm encountering a new error: "Error: EPERM: operation not permitted, lstat 'C:\WINDOWS\system32\config\systemprofile.node-red\settings.js'".
My question is, why is Node-RED attempting to create files in the "system32" directory? How can I set it to create these files in the root directory instead?
To take advantage of Windows native authentication (Active Directory or Azure Active Directory)
For the same reason why people want to use any proxy for micro-service architectures - efficiency and security.
Had you asked "why on earth would you want to use Windows for this", I'd have given a different answer
The correct way to do this is to use iisnode as the reverse proxy. This is how Microsoft themselves run node.js services on Azure.
Azure/iisnode: Hosting node.js applications in IIS on Windows (github.com)
tjanczuk/iisnode: Hosting node.js applications in IIS on Windows (github.com)
iisnode directly manages the node.js app - rather like how PM2 works but integrated to IIS. So it will restart the service if it fails, etc.