DEV Community

Discussion on: Hosting a Node.js application on Windows with IIS as reverse proxy

Collapse
 
abhishekhingu profile image
abhishekhingu

How can I host two different expressjs app using IIS

Collapse
 
petereysermans profile image
Peter Eysermans

I have not tested this out but the express js apps would both run on a different port. For example one app would run on port 3000, the other on port 3001. In IIS you'd have to create two websites with the reverse proxy settings from one website pointing to localhost:3000 and the other pointing to localhost:3001.

Collapse
 
jmanuel_velasco profile image
JManuel

Yes, this is exacly how it works.
You can have both API published from the same main domain as well.

your-api.domain.com/api1
your-api.domain.com/api2

By defining the reverse proxy rules in the same IIS site.