2021-05-31 16:14:28 +02:00
|
|
|
# ki-frontend
|
|
|
|
|
2021-06-07 17:41:25 +02:00
|
|
|
|
|
|
|
Vue3 Projekt:
|
2021-05-31 16:14:28 +02:00
|
|
|
## Project setup
|
|
|
|
```
|
2021-06-14 22:27:23 +02:00
|
|
|
npm ci
|
2021-05-31 16:14:28 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Compiles and hot-reloads for development
|
|
|
|
```
|
2021-06-28 18:08:36 +02:00
|
|
|
VUE_APP_API_URL=http://localhost:8000 npm run serve
|
2021-05-31 16:14:28 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Compiles and minifies for production
|
|
|
|
```
|
2021-06-28 18:08:36 +02:00
|
|
|
VUE_APP_API_URL=http://localhost:8000 npm run build
|
2021-05-31 16:14:28 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
### Lints and fixes files
|
|
|
|
```
|
|
|
|
npm run lint
|
|
|
|
```
|
|
|
|
|
|
|
|
### Customize configuration
|
|
|
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|
2021-06-07 17:41:25 +02:00
|
|
|
|
2021-06-14 15:02:53 +02:00
|
|
|
Vorraussetzung: Node & NPM
|
|
|
|
|
|
|
|
### Enviroment Variable
|
2021-06-14 22:27:23 +02:00
|
|
|
VUE_APP_API_URL ist die Enviroment Variable mit der die Adresse der API übergeben wird
|
|
|
|
|
|
|
|
|
|
|
|
## Docker
|
|
|
|
|
|
|
|
### Image bauen
|
|
|
|
|
|
|
|
```
|
|
|
|
docker build --tag ki_frontend .
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Container starten
|
|
|
|
|
|
|
|
```
|
|
|
|
docker run \
|
|
|
|
--name=ki_frontend \
|
|
|
|
-e VUE_APP_API_URL=http://localhost:5000 \
|
|
|
|
-p 8000:80 \
|
|
|
|
ki_frontend
|
|
|
|
```
|