I’m working on a project using React and Express. What is the best practice for coding in the fetch URLs that my react project will use when those same URLs will change in production?
i.e., they’re localhost:8000/getdata (or whatever) right now, but they’ll be someapp.com/getdata when it goes to production?
I’m sure there’s some kind of best practice for this, but I don’t even know what it’s called to google it.
They aren’t currently–I’m running a react instance and a separate Express one. Most of the tutorials I’ve seen indicate that express has a hard time running anything but a npm build version a react page. I would LIKE to have the react page be served up as the static page from express when I’m done, though.
Wonderful, that’s just the kind of info I’m looking for (the separation of back and front end, when it’s appropriate, etc.). But the link didn’t come through–can you please resend?