Java: the front and rear ends are separated and the back-end (tomcat), is run with IDEA. How are the front-end pages deployed during the development phase?

for testing and production deployment, just throw the front-end page to nginx

but at the time of development, how do you deploy the front-end page?


so far, you can see:

  • uses the html preview feature that comes with idea (which is the same as when actually deployed to the server). The front end needs to rely on the back end to do homologous processing to prevent cross-domain.
  • express server that uses nodejs. This is the complete nodejs approach, and the front end actually has the background code, the page calls the front end service, and then the front end service invokes the back end service.
Menu