How to configure standalone Jetty 9 as a reverse proxy to a node app?

601 views Asked by At

We are using standalone Jetty 9 to serve some webapps that are deployed as war files. The thing is that we just released a NodeJs webapp that uses Express and listens on localhost:3000, and we would like our jetty server to act as a reverse proxy to the node app so that we can associate it to a domain. I have not been able to find any examples about how to achieve this. Jetty is the only server we have on the machine (we are not using Apache, Nginx or anything else in front) so we are wondering if we can use it to pass requests to the Node app apart from serving the java webapps. Please remember we are using the STANDALONE version of Jetty.

1

There are 1 answers

0
Joakim Erdfelt On

What you want is to setup a org.eclipse.jetty.proxy.ProxyServlet for your specific configuration.