Development
Once the setup is completed, you can start developing your microexecutor inside OpenVSCode.
You can use the following tutorial, or watch this video (note: the video is in Italian only):
1. Access the OpenVSCode web user interface
- using your browser of choice, go to:
http://<your-data-address>/editor
- if you're using Data version
< 3.13.0
, go to:http://<your-data-address>:3500
- if you're using Data version
- if authentication is enabled, login with the correct username/password combination
2. Open the development folder
- in the menu on the left, there will be a blue button with the label "Open Folder", click it
- open the folder that was mounted in the setup step (look at the
openvscode.extraVolumeMounts[0].name
value, such as/home/kokos/mex-development
)
3. Clone your MicroExecutor repository
- open a new terminal (you can use the shortcut
Ctrl + Shift + C
) - run the command
git clone <your-repo-url> .
do not forget about the finishing dot (.
)!- if you see errors regarding a non-empty folder, remove the existing
package-lock.json
file and run the clone command again
- if you see errors regarding a non-empty folder, remove the existing
- you will be prompted to login with the remote Git provider. Follow the process and login with your account
- once logged in, the clone process will complete on its own
warning
if you still get errors during the Clone command, delete the package-lock.json
file and the .git
directory by running the following commands in the terminal:
rm -rf .git
rm package-lock.json
then run the clone command again
4. Start developing!
You're now able to start developing by editing the files directly inside OpenVSCode. The changes will be reflected in your MicroExecutor right after you save the files, thanks to hot reload.
To save your work, make sure to commit and push to the remote repository. For Git providers other than GitHub, OpenVSCode might ask your username+password again when you run a git push
.
Gotchas and Tips
- make sure to save the files you're working on when you want the hot reload process to rebuild the microexecutor
- don't worry if you run into build errors, simply fix them and the hot reload will rebuild the microexecutor
- you can see the logs of the build command through ArgoCD