Parcourir la source

:gear: add some prod specific flavor

tags/0.0.4
j il y a 2 ans
Parent
révision
fe46aecf04
2 fichiers modifiés avec 5 ajouts et 3 suppressions
  1. 3
    1
      frontend/.env.sample
  2. 2
    2
      frontend/src/utils/db.js

+ 3
- 1
frontend/.env.sample Voir le fichier

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

+ 2
- 2
frontend/src/utils/db.js Voir le fichier

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

Chargement…
Annuler
Enregistrer