I built a project using React at the front and Strapi (based on Node.js) at the back.
On the client side, I'm trying to access my api url like so:
const apiUrl = process.env.API_URL || 'http://localhost:1337'
const strapi = new Strapi(apiUrl);
But process.env.API_URL is undefined. If I log process.env all I get is an object containing:
NODE_ENV: "development"
PUBLIC_URL: ""
How can I access my api_url ? I'm guessing there is a file where I should define API_URL myself?