How to use Nodejs and Express to realize the request forwarding function between the browser and a REST server?

  node.js, question

图片描述

The background of the project is as follows: the database uses Oracle and uses Spring MVC to provide a REST-style data service. If the browser needs data interaction with REST API, it should forward it through Nodejs. Agree on all shipping to/rest/If the initial request is not verified, it will be sent directly to the Spring server at the Node side. Now the Nodejs server uses Express 4.13.1.

Question: In routes, I would like to send all browser messages to/rest/Most of the initial requests are forwarded to REST server. What should I do?

Any npm module recommendation is also acceptable.

Add: In my book “Proficient in AngularJS”, inside, I saw the relevant technology and the translator called it “server-side proxy” (page 83).

Ask yourself and answer. It’s done. Routes regular expression of express framework. When it is done, write down the practical experience and share it with everyone.