79167604

Date: 2024-11-07 18:09:40
Score: 0.5
Natty:
Report link

If you are using Vite, use import.meta.env instead, process.env is removed.

And make sure variables start with VITE_ in .env file.

here is example .end file:

VITE_API_BASE_URL = http://localhost:8080/api/v1

and here service will look like:

const API_BASE_URL = import.meta.env.VITE_API_BASE_URL;

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: VAIBHAV NIRMAL