0

I am new to reactJS. I am working on project which uses following :

Front-end : ReactJS

Backend : NodeJS (Express)

Front-end runs on port 3000 Back-end runs on port 8088.

I am planning to deploy application on amazon AWS.

What i am trying to do is load reactJS front-end when i make request on http://localhost:8088/

I know using axios we can make request on backend server and display fetched data.

What would be standard way of loading ReactJS front from the nodeJS ?

2
  • You need a tutorial ,look for some online resources Commented Apr 9, 2021 at 9:39
  • I recommand to see this video by Brad Traversy. youtube.com/watch?v=v0t42xBIYIs Commented Apr 9, 2021 at 10:11

1 Answer 1

1

I'm not sure if this is the answer you are looking for, but generally in development you use something called proxy in your package.json in the client (react) folder:

{
  // Other stuff
  "proxy": "http://localhost:8088"
}

and then when you'd want to deploy you'd run npm build for your react folder and serve that generated folder called build. But as I said, you usually do that only when deploying your application onto server, not the actual development.

Also I'd suggest checking some of these videos, that are focused on deployment, because that is what I think you are asking, right ?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.