add env port

This commit is contained in:
yogiedigital
2025-09-20 01:43:40 +07:00
parent 431a060796
commit aa2eacbf38
2 changed files with 3 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
VITE_API_URL=https://api.example.com
VITE_APP_NAME=MyReactApp
VITE_MQTT_SERVER=mosquitto-apotek-2
# VITE_MQTT_SERVER=117.102.231.130
# VITE_MQTT_SERVER=117.102.231.130
VITE_MQTT_PORT=4001

View File

@@ -22,7 +22,7 @@ function App() {
const mqttOptions = {
host: `${import.meta.env.VITE_MQTT_SERVER}`,
// host: 'mosquitto-apotek-2',
port: 7001,
port: Number(`${import.meta.env.VITE_MQTT_PORT}`),
// protocol: "mqtt",
username: 'morekmorekmorek',
password: 'morek888',