Explorar el Código

:gear: tweak env var name for vite pick-up

tags/0.0.4
j hace 2 años
padre
commit
d5b374d6d6
Se han modificado 2 ficheros con 4 adiciones y 4 borrados
  1. 2
    2
      frontend/.env.sample
  2. 2
    2
      frontend/src/utils/db.js

+ 2
- 2
frontend/.env.sample Ver fichero

@@ -1,4 +1,4 @@
1 1
 VITE_PUBNUB_PUBLISH_KEY=pub-a-123467890-123467890
2 2
 VITE_PUBNUB_SUBSCRIBE_KEY=sub-a-123467890-123467890
3
-API_HOST=localhost
4
-API_PORT=3001
3
+VITE_API_HOST=localhost
4
+VITE_API_PORT=3001

+ 2
- 2
frontend/src/utils/db.js Ver fichero

@@ -1,5 +1,5 @@
1
-const domain = import.meta.env.API_HOST
2
-const port = import.meta.env.API_PORT
1
+const domain = import.meta.env.VITE_API_HOST
2
+const port = import.meta.env.VITE_API_PORT
3 3
 const httpProtocol = `http`
4 4
 const prefix = 'api'
5 5
 const remote = `${httpProtocol}://${domain}:${port}/${prefix}`

Loading…
Cancelar
Guardar