Sorry for the late response
You're absolutely right iisnode is no longer actively maintained and isn't recommended for modern Node.js deployments. Instead, the most efficient and reliable way to host a Node.js Express (TypeScript) API on IIS is by using IIS as a reverse proxy to forward requests to your Node.js application running on a separate port.
Here's an overview:
- Run your Node.js app on a local port (e.g.,
http://localhost:3000). - Install and configure IIS with the URL Rewrite and ARR (Application Request Routing) modules.
- Set up a reverse proxy rule in IIS to forward incoming HTTP requests to your Node.js app.
This approach allows IIS to handle incoming traffic, SSL termination, and logging, while your Node.js app handles the API logic.
Reference:
- https://stackoverflow.com/questions/79366606/deploying-nodejs-application-in-iis-server
- https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing
Hope this helps!