build(deps): apply updates
[e-mobility-charging-stations-simulator.git] / ui / web / README.md
... / ...
CommitLineData
1# Web UI
2
3## Project setup
4
5```shell
6corepack enable
7corepack prepare pnpm@latest --activate
8pnpm install
9```
10
11The simulator UI server must be enabled, use WebSocket and disable authentication. The simulator main configuration file should have a `uiServer` section like this:
12
13```json
14 "uiServer": {
15 "enabled": true,
16 "type": "ws",
17 "authentication": {
18 "enabled": false,
19 "type": "basic-auth",
20 "username": "admin",
21 "password": "admin"
22 }
23 },
24```
25
26See [here](../../README.md#charging-stations-simulator-configuration) for more details.
27
28### Run
29
30#### Compiles and run for production
31
32```shell
33pnpm start
34```
35
36#### Compiles and run for development
37
38```shell
39pnpm serve
40```
41
42#### Try it out
43
44For both options above you can then follow the link displayed in the terminal at the end of compilation. The Web UI looks like the following
45
46![webui](./assets/webui.png)
47
481. With the top 2 buttons you can now stop and afterwards start the simulator and inspect the server console for the number of charging stations, e.g. with the default configuration: `Charging stations simulator ... started with 10 charging station(s)`
492. Each charging station is a row in the table below, try "Stop Charging Station" and refresh with the large blue button and see the status Started turns from Yes into No.
50
51### Compiles and minifies for production
52
53```shell
54pnpm build
55```
56
57### Lints files
58
59```shell
60pnpm lint
61```