I know this might sound like a stupid question but here goes!
At working I am building a react app. Said react app has an api in which I can pull data and soon should be able to have the auth to do all GET, PUT, POST & PATCH requests.
At the moment I have been using json-server to work with data which is in the public folder and today I have been building an node / express server but I am questioning if I actually need to do this as the backend developers will soon have the API all done and then I should be able to run GET, PUT, POST & PATCH requests in axios right?
Or should I create a backend which will be in a docker container and then that pulls in the API and I can do GET, PUT, POST & PATCH requests via node / express.
Cheers and apologies if this is glaringly obvious. I just need to clear this up in my head!
So a different developer(s) are working on the API, not you?
Being able to mock the API in some way is usually not a bad idea instead of having to hit the real API when creating the front end. But how you want to do it depends.
Not really sure I fully understand the question though.
Thanks for the reply - ok put simply do I need to set up a node / express server if I am given access to and API / database where I can make GET, PUT, POST & PATCH requests in axios in the react app. Sorry for not being clear - thanks
But like I said it can be handy to not have to call the real API. Even if it is just a local version of the API instead of the real API, which presumably is hosted live somewhere. Just to avoid unnecessary traffic to the real API.
Well I might aswell use company time to learn more node / express and build a sever. Lucky my boss is getting Frontend Master account and learn more that way too.