-1

How do I setup the following :

Web Server : react + typescript application using npm - http://server1:19000/enter

Backend Server : Springboot http://server2:20000/api

I am using webpack to build the react application and springboot using mvn

Os : Windows

1 Answers1

0

in application.properties on springBoot you can set

server.port = 8090

With react you can set the port

webpack-dev-server --host 0.0.0.0 --port 80

it's the most easier way to set port, if you google a little you will find another ways.

i hope it usefull

Edison Junior
  • 320
  • 1
  • 6
  • thanks for the info. I want to connect these two. when I submit a form from react, it has to go springboot and respond back. The url of springboot need to be configured, but dont know where. – user6400807 May 04 '19 at 05:19
  • cross orign error ? if you are run local, your url is `localhost:port`, – Edison Junior May 04 '19 at 05:20
  • strong reference for you https://stackoverflow.com/questions/54984329/invalid-cors-request-for-put-with-angularjs/54984424#54984424 – Edison Junior May 04 '19 at 05:25