build(ui): switch to pnpm
[e-mobility-charging-stations-simulator.git] / ui / web / README.md
CommitLineData
32de5a57
LM
1# Web UI
2
3## Project setup
4
d6b76da3 5```shell
603f1011
JB
6corepack enable
7pnpm install
32de5a57
LM
8```
9
8228f972
JB
10The simulator UI server must be enabled, use WebSocket and disable authentication. The simulator main configuration file should have a `uiServer` section like this:
11
12```json
13 "uiServer": {
14 "enabled": true,
15 "type": "ws",
16 "authentication": {
17 "enabled": false,
18 "type": "basic-auth",
19 "username": "admin",
20 "password": "admin"
21 }
22 },
23```
24
15124b9a 25See [here](../../README.md#charging-stations-simulator-configuration) for more details.
8228f972 26
32de5a57
LM
27### Run
28
efdd1922 29#### Compiles and run for production
32de5a57 30
d6b76da3 31```shell
603f1011 32pnpm start
32de5a57
LM
33```
34
efdd1922 35#### Compiles and run for development
32de5a57 36
d6b76da3 37```shell
603f1011 38pnpm run serve
32de5a57 39```
bbe10d5f 40
d07e35d2
MK
41#### Try it out
42
43For 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
44
45![webui](./assets/webui.png)
46
471. 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)`
482. 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.
32de5a57
LM
49
50### Compiles and minifies for production
51
d6b76da3 52```shell
603f1011 53pnpm run build
32de5a57
LM
54```
55
56### Lints files
57
d6b76da3 58```shell
603f1011 59pnpm run lint
32de5a57 60```