21 lines
1.0 KiB
JSON
21 lines
1.0 KiB
JSON
{
|
|
"version": "2.0.0",
|
|
"tasks": [
|
|
{
|
|
"label": "Run app",
|
|
"detail": "Prepares .venv and the front end if needed, then launches the server on http://127.0.0.1:8770 (links data, labeling, detectors, tools, agents and optimizer: README.md)",
|
|
"type": "shell",
|
|
"command": "{ [ -d .venv ] || { python3 -m venv .venv && .venv/bin/pip install -q -r app/requirements.txt; }; } && (cd app/web && { [ -d node_modules ] || npm install; } && npm run build) && .venv/bin/python app/server/server.py",
|
|
"isBackground": true,
|
|
"problemMatcher": []
|
|
},
|
|
{
|
|
"label": "Reload the service",
|
|
"detail": "After a change of the code: rebuilds the page and relaunches the systemd service aimsight-app on http://127.0.0.1:8770 (README.md, Run as a service)",
|
|
"type": "shell",
|
|
"command": "systemctl --user restart aimsight-app && systemctl --user is-active aimsight-app && echo http://127.0.0.1:8770 || { journalctl --user -u aimsight-app -n 30 --no-pager; exit 1; }",
|
|
"problemMatcher": []
|
|
}
|
|
]
|
|
}
|