Re-thinking developer experience • Product @Gitpod 🍊 Helping folks get their start in cloud • @openupthecloud ☁️ AWS Community Builder 🛠 Replies in GIFS 😃
All of the requests are for absolute paths. So for the ping example would just be:
/ping
Then node works out to send it to the right place. This maps the create react app on port 3000 to the api requests on 8080.
If you want them on a separate server you'll need to call with the port number, or domain that you setup your api server on.
Like so:
yourdomain:8080/ping
With that option, however you'll neeed to fiddle with your API access control. So that you only allow access to your app, not the whole internet. However, this can be more tricky and fiddly and depends a lot on how you setup your architecture.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey Sammy!
All of the requests are for absolute paths. So for the ping example would just be:
Then node works out to send it to the right place. This maps the create react app on port 3000 to the api requests on 8080.
If you want them on a separate server you'll need to call with the port number, or domain that you setup your api server on.
Like so:
With that option, however you'll neeed to fiddle with your API access control. So that you only allow access to your app, not the whole internet. However, this can be more tricky and fiddly and depends a lot on how you setup your architecture.