This is the Vue.js Application of MyRoutes project.
Note: It works with Node JS
version 16.20.2, 18.19.1, 20.11.1.
This install all necesary packages.
npm install
We have to configure the environment file. We can see an example in the file .env.example
.
# Environment file example
# Auth API
VITE_AUTH_BASE_URL=http://localhost:3000/auth
# User API
VITE_USER_BASE_URL=http://localhost:3000/user
# File API
VITE_FILE_BASE_URL=http://localhost:3000/file
# Track API
VITE_TRACK_BASE_URL=http://localhost:3000/track
# Configuration API
VITE_CONFIGURATION_BASE_URL=http://localhost:3000/Configuration
# MapBox Access token
# See: https://docs.mapbox.com/help/getting-started/access-tokens/
VITE_MAPBOX_ACCESS_TOKEN=Here_goes_your_MapBox_access_token
# Encryptation password
VITE_ENCRYPTATION_PASSWORD=Here_goes_your_encryptation_password
For local use in development mode the file will be named as .env.local
.
npm run dev
npm run build
Lint with ESLint
npm run lint
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
TypeScript cannot handle type information for .vue
imports by default, so we replace the tsc
CLI with vue-tsc
for type checking. In editors, we need TypeScript Vue Plugin (Volar) to make the TypeScript language service aware of .vue
types.
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a Take Over Mode that is more performant. You can enable it by the following steps:
- Disable the built-in TypeScript Extension
- Run
Extensions: Show Built-in Extensions
from VSCode's command palette - Find
TypeScript and JavaScript Language Features
, right click and selectDisable (Workspace)
- Run
- Reload the VSCode window by running
Developer: Reload Window
from the command palette.
See Vite Configuration Reference.
To create the Docker image, the following command has been used:
docker build -t sbarquero/myroutes.front:1.1.4 .
docker build -t sbarquero/myroutes.front:latest .
To upload the image to Docker, the following command was used:
docker push sbarquero/myroutes.front:1.1.4
docker push sbarquero/myroutes.front:latest
By running the following command, the container needed to get the frontend up and running is raised.
The container created is:
myroutes.front
- Myroutes frontend in Nginx container.
docker-compose up
Visit the project MyRoutes.Docker in Github