Note
Make sure to install the cli first, with:
app code install cli
APPNAME=code-serveweb
APPTITLE="Code serveweb"
SVCNAME=dotfiles-apps-${APPNAME}
CODEHOST=0.0.0.0
CODEPORT=8001if ! app code check cli; then
app code install cli
fi
apps_service_install ${APPNAME} ${APPTITLE}systemctl --user enable --now ${SVCNAME}systemctl --user disable --now ${SVCNAME}systemctl --user start ${SVCNAME}systemctl --user stop ${SVCNAME}systemctl --user restart ${SVCNAME}systemctl --user status ${SVCNAME}systemctl --user is-active ${SVCNAME}mkdir -p ~/.config/systemd/user/
curl -fsSL https://raw.githubusercontent.com/gbraad-vscode/code-systemd/refs/heads/main/user/code-serveweb.service \
-o ~/.config/systemd/user/code-serveweb.service
systemctl --user daemon-reload
#systemctl --user enable --now code-servewebsudo curl -fsSL https://raw.githubusercontent.com/gbraad-vscode/code-systemd/refs/heads/main/system/code-serveweb%40.service \
-o /etc/systemd/system/code-serveweb@.service
sudo systemctl daemon-reload
#sudo systemctl enable --now code-serveweb@${USER}${LOCALBIN}/code serve-web --without-connection-token --host ${CODEHOST} --port ${CODEPORT}screen code serveweb