Setup IDE for OpenEMS UI
| Visual Studio Code is the recommended development environment for OpenEMS UI. If you do not plan to actively develop on OpenEMS UI, you can simply use the prebuilt UI or [deploy the OpenEMS UI as docker image](https://openems.github.io/openems.io/openems/latest/edge/deploy/docker.html#_openems_edge_ui). |
1. Setup Visual Studio Code
-
Download node.js LTS and install it.
-
Download Visual Studio Code , install and start it.
-
Open OpenEMS UI source code in Visual Studio Code:
Menu: File → Open Folder… → Select the
uidirectory inside the downloaded source code (for exampleC:\Users\your.user\git\openems\ui) → Select directory -
Open the integrated terminal:
Menu: Terminal → New Terminal
-
Install Angular CLI :
npm install -g @angular/cliIf you receive an error message that the command npmcould not be found, make sure that node.js is installed and restart Visual Studio Code. -
Resolve and download dependencies:
npm install
2. Run OpenEMS UI
-
In Visual Studios integrated terminal type…
ng serve -c openems-edge-devIf you receive an error message, that you have no rights to execute "ng serve", set Set-ExecutionPolicy RemoteSigned -Scope CurrentUser.The log shows:
NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ -
Open a browser at http://localhost:4200