request the backend address in nuxt, for example, I want to send post data to the server (the server out of the interface is a separate project)
in the local development environment, I want to send it to localhost:5000 (the project of nuxt is localhost 3000)
in the test environment, I want to send it to test.a.com
in a formal environment, I want to send it to a.com
but when using axios request, I want to use relative address. / api, can avoid cross-domain problems. How to configure
I found @ nuxt/proxy, on the Internet but didn"t know how to distinguish the environment. (I don"t know whether this component is only used for development or can be used online.)
at the same time, I would like to ask nuxt how to distinguish between environments (development, testing, formal)