Development Guide

When developing, you need to have Node, Git environment in the local machine, and need to know about npm,Vue.js, MQTT,TypeScript and other related knowledge.

# Fork & Clone project
git clone${name}/MQTTX.git

cd MQTTX/web
yarn install

# Compile and hot reload for development
yarn run serve

# Compile and compress to build a production version
yarn run build

# Compiles for production & serve generated files of site locally
yarn run start

# Compiles and prepares for Docker containerization
yarn run build:docker

# Build Docker image
docker build -t mqttx-web .

# Run Docker image
docker run -p 80:80 mqttx-web

After a successful build, the corresponding files of the successful build will appear in the dist directory.

Modify Configuration

If you need to make personalized settings, such as modifying the default connection path, deployment path, or output path, you can make the corresponding modifications in the web/.env or web/.env.docker files. These two files correspond to different packaging requirements, and you can choose to modify them according to your actual situation.

Configuration ItemDescription
VUE_APP_PAGE_TITLEThe title is displayed in the browser's title bar
VUE_APP_PAGE_DESCRIPTIONA brief page description for SEO purposes
VUE_APP_DEFAULT_HOSTThe default address of the MQTT broker server connections
BASE_URLThe root URL where the application is deployed. Useful for constructing links and routing
VUE_APP_OUTPUT_DIRThe directory where the build files will be placed after compilation


Please make sure to read the Contributing Guide before making a pull request.