This project contains the Vue.js-based web frontend of OpenMTS.
npm install
: Install dependencies.npm run serve
: Compile and host with hot-reloading for development.npm run build
: Build for production.
This project includes a Prettier configuration file. Add Prettier to your editor (eg. Prettier for VS Code) and enable formatting-on-save.
When building for production, set the backend API endpoint in the .env
file:
VUE_APP_SERVER_ENDPOINT=http://localhost:5000
If the frontend isn't hosted on its host's web server root, set the public path in the vue.config.js
file when building. If for example, the frontend is hosted at http://192.168.0.55/openmts-frontend
, set the public path to ./openmts-frontend
:
module.exports = {
publicPath:
process.env.NODE_ENV === "production" ? "./openmts-frontend" : "/",
};